backup.
This commit is contained in:
51
lib/widgets/general/bottom_nav.dart
Normal file
51
lib/widgets/general/bottom_nav.dart
Normal file
@@ -0,0 +1,51 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class BottomNav extends StatefulWidget {
|
||||
const BottomNav({Key key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() {
|
||||
return BottomNavState();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class BottomNavState extends State<BottomNav> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
height: 50.0,
|
||||
padding: EdgeInsets.symmetric(vertical: 10.0, horizontal: 10.0),
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xff232323),
|
||||
),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
Container(
|
||||
child: Text(
|
||||
'© 2007-${DateTime.now().year} wisetronic.com. All Rights Reserved.',
|
||||
style: TextStyle(
|
||||
fontSize: 10.0,
|
||||
color: Colors.white60,
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
child: Text(
|
||||
'All logos shown are registered trademark, copyrighted and belong to their respective owners.',
|
||||
style: TextStyle(
|
||||
fontSize: 10.0,
|
||||
color: Colors.white60,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
90
lib/widgets/general/download_item.dart
Normal file
90
lib/widgets/general/download_item.dart
Normal file
@@ -0,0 +1,90 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:universal_io/io.dart';
|
||||
import '../../utils/util_web.dart' if (dart.library.io) '../../utils/util_io.dart';
|
||||
|
||||
class DownloadItem extends StatefulWidget {
|
||||
final dynamic desc;
|
||||
final double width;
|
||||
const DownloadItem(this.desc, {Key key, this.width}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() {
|
||||
return DownloadItemState();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class DownloadItemState extends State<DownloadItem> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
return Container(
|
||||
padding: EdgeInsets.only(top: 10.0, bottom: 10.0, left: 10.0, right: 10.0),
|
||||
child: Column(
|
||||
children: [
|
||||
Container(
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Container(
|
||||
child: Row(
|
||||
children: [
|
||||
Container(
|
||||
child: Util.showImage(
|
||||
'https:${widget.desc['app_icon']}',
|
||||
width: 32.0,
|
||||
height: 32.0,
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
child: Column(
|
||||
children: [
|
||||
Text(
|
||||
'${widget.desc['name']}',
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 15.0,
|
||||
color: Colors.black87,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'${widget.desc['version']}',
|
||||
style: TextStyle(
|
||||
fontSize: 12.0,
|
||||
color: Colors.black38,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
child: getDownloadButton(),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
child: Text(
|
||||
'${widget.desc['description']}',
|
||||
style: TextStyle(
|
||||
color: Colors.black54,
|
||||
),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget getDownloadButton() {
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
21
lib/widgets/general/index_carousel.dart
Normal file
21
lib/widgets/general/index_carousel.dart
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_wisetronic/models/gallery.dart';
|
||||
import '../desktop/desktop_Index_carousel.dart';
|
||||
import '../mobile/mobile_index_carousel.dart';
|
||||
import 'package:responsive_builder/responsive_builder.dart';
|
||||
|
||||
class IndexCarousel extends StatelessWidget {
|
||||
final List<Gallery> galleries;
|
||||
const IndexCarousel(this.galleries, {Key key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ScreenTypeLayout(
|
||||
mobile: MobileIndexCarousel(galleries),
|
||||
tablet: DesktopIndexCarousel(galleries),
|
||||
desktop: DesktopIndexCarousel(galleries),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
20
lib/widgets/general/index_main_content_1.dart
Normal file
20
lib/widgets/general/index_main_content_1.dart
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_wisetronic/widgets/desktop/desktop_index_main_content_1.dart';
|
||||
import 'package:flutter_wisetronic/widgets/mobile/mobile_index_main_content_1.dart';
|
||||
import 'package:responsive_builder/responsive_builder.dart';
|
||||
|
||||
class IndexMainContent1 extends StatelessWidget {
|
||||
final String message;
|
||||
const IndexMainContent1(this.message, {Key key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ScreenTypeLayout(
|
||||
mobile: MobileIndexMainContent1(message),
|
||||
tablet: DesktopIndexMainContent1(message),
|
||||
desktop: DesktopIndexMainContent1(message),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
20
lib/widgets/general/index_main_content_2.dart
Normal file
20
lib/widgets/general/index_main_content_2.dart
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import '../desktop/desktop_index_main_content_2.dart';
|
||||
import '../mobile/mobile_index_main_content_2.dart';
|
||||
import 'package:responsive_builder/responsive_builder.dart';
|
||||
|
||||
class IndexMainContent2 extends StatelessWidget {
|
||||
final Map<String, dynamic> content;
|
||||
const IndexMainContent2(this.content, {Key key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ScreenTypeLayout(
|
||||
mobile: MobileIndexMainContent2(content),
|
||||
tablet: DesktopIndexMainContent2(content),
|
||||
desktop: DesktopIndexMainContent2(content),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
20
lib/widgets/general/index_main_content_3.dart
Normal file
20
lib/widgets/general/index_main_content_3.dart
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import '../desktop/desktop_index_main_content_3.dart';
|
||||
import '../mobile/mobile_index_main_content_3.dart';
|
||||
import 'package:responsive_builder/responsive_builder.dart';
|
||||
|
||||
class IndexMainContent3 extends StatelessWidget {
|
||||
final Map<String, dynamic> content;
|
||||
const IndexMainContent3(this.content, {Key key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ScreenTypeLayout(
|
||||
mobile: MobileIndexMainContent3(content),
|
||||
tablet: DesktopIndexMainContent3(content),
|
||||
desktop: DesktopIndexMainContent3(content),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
37
lib/widgets/general/navigationbar.dart
Normal file
37
lib/widgets/general/navigationbar.dart
Normal file
@@ -0,0 +1,37 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_wisetronic/widgets/desktop/desktop_navigationbar.dart';
|
||||
import 'package:flutter_wisetronic/widgets/mobile/mobile_navigationbar.dart';
|
||||
import 'package:responsive_builder/responsive_builder.dart';
|
||||
|
||||
class NavigationBar extends StatefulWidget implements PreferredSizeWidget {
|
||||
final Key key;
|
||||
final PreferredSizeWidget bottom;
|
||||
|
||||
NavigationBar({Key key, PreferredSizeWidget bottom})
|
||||
: key = key,
|
||||
preferredSize = Size.fromHeight(kToolbarHeight + (bottom?.preferredSize?.height ?? 0.0)),
|
||||
bottom = bottom;
|
||||
|
||||
@override
|
||||
final Size preferredSize;
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() {
|
||||
return NavigationBarState();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class NavigationBarState extends State<NavigationBar> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ScreenTypeLayout(
|
||||
mobile: MobileNavigationBar(),
|
||||
tablet: DesktopNavigationBar(),
|
||||
desktop: DesktopNavigationBar(),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
25
lib/widgets/general/navigationbar_logo.dart
Normal file
25
lib/widgets/general/navigationbar_logo.dart
Normal file
@@ -0,0 +1,25 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class NavigationBarLogo extends StatelessWidget {
|
||||
const NavigationBarLogo({Key key}) : super(key: key);
|
||||
|
||||
static const IconData logoData = IconData(
|
||||
0xe800,
|
||||
fontFamily: 'wisetronic',
|
||||
fontPackage: null
|
||||
);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SizedBox(
|
||||
height: 48,
|
||||
width: 178,
|
||||
child: Icon(
|
||||
logoData,
|
||||
color: Colors.white,
|
||||
size: 48.0,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
58
lib/widgets/general/text_link.dart
Normal file
58
lib/widgets/general/text_link.dart
Normal file
@@ -0,0 +1,58 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
class TextLink extends StatelessWidget {
|
||||
final String title;
|
||||
final String url;
|
||||
final Color color;
|
||||
final double paddingHorizontal;
|
||||
final double paddingVertical;
|
||||
final FontWeight fontWeight;
|
||||
final bool selected;
|
||||
TextLink(this.title, this.url, {
|
||||
this.color,
|
||||
this.paddingHorizontal,
|
||||
this.paddingVertical,
|
||||
this.fontWeight,
|
||||
this.selected
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MouseRegion(
|
||||
cursor: SystemMouseCursors.click,
|
||||
child: GestureDetector(
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: paddingVertical ?? 0.0,
|
||||
horizontal: paddingHorizontal ?? 0.0
|
||||
),
|
||||
child: Text(
|
||||
title,
|
||||
style: TextStyle(
|
||||
color: color ?? Colors.blue,
|
||||
fontWeight: fontWeight ?? FontWeight.normal,
|
||||
),
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
border: (selected != null && selected) ? Border(
|
||||
bottom: BorderSide(
|
||||
color: color ?? Colors.blue,
|
||||
width: 3.0,
|
||||
)
|
||||
) : null,
|
||||
),
|
||||
),
|
||||
onTap: () async {
|
||||
if (await canLaunch(url)) {
|
||||
await launch(url);
|
||||
} else {
|
||||
throw 'Could not launch $url';
|
||||
}
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user