diff --git a/.vscode/launch.json b/.vscode/launch.json index f08c024..0f0fd6c 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -11,5 +11,15 @@ "lib/main-dev.dart", ], }, + { + "name": "Flutter Dev2", + "request": "launch", + "type": "dart", + "program": "lib/main-dev.dart", + "args": [ + "-t", + "lib/main-dev.dart", + ], + }, ] } \ No newline at end of file diff --git a/lib/pages/home_page.dart b/lib/pages/home_page.dart index 4be8a25..9ac8476 100644 --- a/lib/pages/home_page.dart +++ b/lib/pages/home_page.dart @@ -117,17 +117,17 @@ class _HomePageState extends State { btnCallback: () => Navigator.of(context) .push(MaterialPageRoute(builder: (_) => ReportList()))); - final pickUpBtn = _buildBtn("pickup.title", + final pickUpBtn = _buildBtn2("pickup.title", icon: FontAwesomeIcons.directions, btnCallback: () => Navigator.of(context) .push(MaterialPageRoute(builder: (_) => PickUpList()))); - final shipmentCostBtn = _buildBtn("pickup.title", + final shipmentCostBtn = _buildBtn2("pickup.title", icon: FontAwesomeIcons.ship, btnCallback: () => Navigator.of(context) .push(MaterialPageRoute(builder: (_) => ShipmentRates()))); - final fcsProfileBtn = _buildBtn("profile.title", + final fcsProfileBtn = _buildBtn2("profile.title", icon: Icons.account_circle, btnCallback: () => Navigator.of(context) .push(MaterialPageRoute(builder: (_) => FCSProfilePage()))); @@ -391,31 +391,34 @@ class _HomePageState extends State { // ], // stops: [0.4, 1.0], // ) - // LinearGradient( - // begin: Alignment.topCenter, - // end: Alignment - // .bottomCenter, // 10% of the width, so there are ten blinds. - // colors: [ - // Color(0xd0272262), - // Color(0xfa272262), - // ], // whitish to gray - // ), - SweepGradient( - center: FractionalOffset.centerLeft, - startAngle: 0.0, - endAngle: math.pi * 2, - colors: const [ - secondaryColor, - primaryColor, - secondaryColor, - primaryColor, - secondaryColor, - ], - stops: const [0.0, 0.25, 0.5, 0.75, 1.0], - ), + LinearGradient( + begin: Alignment.topCenter, + end: Alignment + .bottomCenter, // 10% of the width, so there are ten blinds. + colors: [ + Color(0xd0272262), + Color(0xfa272262), + // Color(0xa0ff4400), + // secondaryColor, + ], // whitish to gray + ), + // SweepGradient( + // center: FractionalOffset.centerLeft, + // startAngle: 0.0, + // endAngle: math.pi * 2, + // colors: const [ + // secondaryColor, + // primaryColor, + // secondaryColor, + // primaryColor, + // secondaryColor, + // ], + // stops: const [0.0, 0.25, 0.5, 0.75, 1.0], + // ), ), child: ListView(children: [ Wrap( + alignment: WrapAlignment.center, children: widgets, ), ]) @@ -519,8 +522,8 @@ class _HomePageState extends State { {Image imgIcon, IconData icon, BtnCallback btnCallback}) { var languageModel = Provider.of(context); return Container( - width: 130, - height: 130, + width: 100, + height: 100, decoration: new BoxDecoration( color: Colors.transparent, //new Color.fromRGBO(255, 0, 0, 0.0), borderRadius: new BorderRadius.only( @@ -539,31 +542,35 @@ class _HomePageState extends State { // Padding(padding: EdgeInsets.only(bottom: 10.0)), ClipOval( child: Material( - color: Colors.white, // button color + color: Colors.black54, // button color child: InkWell( - splashColor: secondaryColor, // inkwell color + splashColor: primaryColor, // inkwell color child: SizedBox( - width: 60, height: 60, child: Icon(icon, size: 35)), + width: 60, height: 60, child:Icon(icon,color: Colors.white, size: 30) + ), onTap: btnCallback, ), ), ), - Text(AppTranslations.of(context).text(title), - style: - // languageModel.isEng - // ? - TextStyle( - color: Colors.white, - fontWeight: FontWeight.normal, - fontSize: 16.0, - fontFamily: "Roboto") - // : TextStyle( - // color: Colors.black, - // fontWeight: FontWeight.w700, - // fontSize: 12.0, - // fontFamily: "MyanmarUnicode") - ), + 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") + ), + ), ]), ), );