Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Sizer]: Overflow issue fix on homscreen #19

Merged
merged 10 commits into from
Dec 28, 2021
2 changes: 1 addition & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Aadeesh11 marked this conversation as resolved.
Show resolved Hide resolved
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 {
Expand Down
61 changes: 35 additions & 26 deletions lib/views/home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -86,39 +86,48 @@ class _MainScreenState extends State<MainScreen> 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: <Widget>[
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);
},
)
],
),
),
Expand Down