diff --git a/lib/main.dart b/lib/main.dart index c0b97e21..f5a3c397 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -9,9 +9,9 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_config/flutter_config.dart'; import 'package:hive/hive.dart'; +import 'package:sizer/sizer.dart'; import 'package:overlay_support/overlay_support.dart'; import 'package:path_provider/path_provider.dart' as path_provider; -import 'package:sizer/sizer.dart'; import 'models/user/user_info.dart'; void main() async { diff --git a/lib/views/home.dart b/lib/views/home.dart index 7fee59c9..14d34bb5 100644 --- a/lib/views/home.dart +++ b/lib/views/home.dart @@ -86,39 +86,48 @@ class _MainScreenState extends State with TickerProviderStateMixin { ), ), Padding( - padding: EdgeInsets.fromLTRB(8, 185, 8, 5), + padding: EdgeInsets.fromLTRB(4.w, 185, 4.w, 5), child: Row( mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisSize: MainAxisSize.max, crossAxisAlignment: CrossAxisAlignment.center, children: [ - HikeButton( - text: 'Create Hike', - textColor: Colors.white, - borderColor: Colors.white, - buttonColor: kYellow, - buttonWidth: 12, - onTap: () { - if (userConfig.currentUser.isGuest) { - navigationService.showSnackBar( - 'You need to login with credentials to start a hike'); - } else { - CreateJoinBeaconDialog.createHikeDialog( + Container( + width: 45.w, + child: HikeButton( + buttonWidth: 0.h, + text: 'Create Hike', + textColor: Colors.white, + borderColor: Colors.white, + buttonColor: kYellow, + onTap: () { + if (userConfig.currentUser.isGuest) { + navigationService.showSnackBar( + 'You need to login with credentials to start a hike'); + } else { + CreateJoinBeaconDialog.createHikeDialog( + context, model); + } + }, + ), + ), + SizedBox( + width: 2.w, + ), + Container( + width: 45.w, + child: HikeButton( + buttonWidth: 0.h, + text: 'Join a Hike', + textColor: kYellow, + borderColor: kYellow, + buttonColor: Colors.white, + onTap: () async { + CreateJoinBeaconDialog.joinBeaconDialog( context, model); - } - }, + }, + ), ), - HikeButton( - text: 'Join a Hike', - textColor: kYellow, - borderColor: kYellow, - buttonColor: Colors.white, - buttonWidth: 12, - onTap: () async { - CreateJoinBeaconDialog.joinBeaconDialog( - context, model); - }, - ) ], ), ),