config dev

This commit is contained in:
2020-08-26 16:01:13 +06:30
parent 2681de6850
commit 52078d7ee0
22 changed files with 401 additions and 101 deletions

View File

@@ -7,7 +7,7 @@ import 'app.dart';
void main() {
Config(
flavor: Flavor.PRODUCTION,
flavor: Flavor.DEV,
color: Colors.blue,
apiURL:
"https://asia-northeast1-mokkon-wholesale-dev.cloudfunctions.net/APIOK",

18
lib/main-prod.dart Normal file
View File

@@ -0,0 +1,18 @@
import 'package:flutter/material.dart';
import 'package:logging/logging.dart';
import 'package:fcs/config.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'app.dart';
void main() {
Config(
flavor: Flavor.PRODUCTION,
color: Colors.blue,
apiURL:
"https://asia-northeast1-mokkon-wholesale-dev.cloudfunctions.net/APIOK",
reportURL: "http://petrok-dev.mokkon.com:8080",
reportProjectID: "prod",
level: Level.ALL);
runApp(App());
}

View File

@@ -8,6 +8,7 @@ import 'package:fcs/pages_fcs/delivery_list.dart';
import 'package:fcs/pages_fcs/package_list.dart';
import 'package:fcs/widget/bottom_up_page_route.dart';
import 'package:fcs/widget/localization/transalation.dart';
import 'package:fcs/widget/right_left_page_route%20copy.dart';
import 'package:flutter/material.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
@@ -245,11 +246,8 @@ class _HomePageState extends State<HomePage> {
),
IconButton(
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => Profile()),
);
Navigator.of(context)
.push(RightLeftPageRoute(Profile()));
},
iconSize: 30,
icon: Icon(Icons.account_circle),
@@ -326,35 +324,41 @@ class _HomePageState extends State<HomePage> {
child: Column(
children: <Widget>[
Expanded(
child: ListView(children: [
Wrap(
alignment: WrapAlignment.center,
children: widgets,
),
]),
child: Padding(
padding: const EdgeInsets.only(top: 8.0),
child: ListView(children: [
Wrap(
alignment: WrapAlignment.center,
children: widgets,
),
]),
),
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
// _buildSmallButton(
// "Policies", FontAwesomeIcons.fileContract),
InkWell(
onTap: () {
Navigator.of(context).push(
MaterialPageRoute(builder: (_) => Contact()));
},
child: _buildSmallButton(
"Contact Us", SimpleLineIcons.support),
),
InkWell(
onTap: () {
Navigator.of(context).push(
MaterialPageRoute(builder: (_) => Term()));
},
child: _buildSmallButton(
"Terms of service", Icons.info_outline),
),
],
Container(
height: 80,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
// _buildSmallButton(
// "Policies", FontAwesomeIcons.fileContract),
InkWell(
onTap: () {
Navigator.of(context)
.push(BottomUpPageRoute(Contact()));
},
child: _buildSmallButton(
"Contact Us", SimpleLineIcons.support),
),
InkWell(
onTap: () {
Navigator.of(context)
.push(BottomUpPageRoute(Term()));
},
child: _buildSmallButton(
"Terms of service", Icons.info_outline),
),
],
),
)
],
))),
@@ -463,20 +467,23 @@ class _HomePageState extends State<HomePage> {
),
),
FittedBox(
fit: BoxFit.fitWidth,
child: Text(AppTranslations.of(context).text(title),
style: languageModel.isEng
? TextStyle(
color: Colors.white,
fontWeight: FontWeight.w500,
fontSize: 14.0,
fontFamily: "Roboto")
: TextStyle(
color: Colors.white,
fontWeight: FontWeight.w700,
fontSize: 12.0,
fontFamily: "MyanmarUnicode")),
Container(
height: 30,
child: FittedBox(
fit: BoxFit.fitWidth,
child: Text(AppTranslations.of(context).text(title),
style: languageModel.isEng
? TextStyle(
color: Colors.white,
fontWeight: FontWeight.w500,
fontSize: 14.0,
fontFamily: "Roboto")
: TextStyle(
color: Colors.white,
fontWeight: FontWeight.w700,
fontSize: 12.0,
fontFamily: "MyanmarUnicode")),
),
),
]),
),

View File

@@ -0,0 +1,23 @@
import 'package:flutter/cupertino.dart';
class RightLeftPageRoute extends PageRouteBuilder {
final Widget child;
RightLeftPageRoute(this.child)
: super(
pageBuilder: (context, animation, secondaryAnimation) => child,
transitionsBuilder: (context, animation, secondaryAnimation, child) {
var begin = Offset(1.0, 0.0);
var end = Offset.zero;
var curve = Curves.ease;
var tween =
Tween(begin: begin, end: end).chain(CurveTween(curve: curve));
return SlideTransition(
position: animation.drive(tween),
child: child,
);
},
);
}