-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
77ae459
commit b1a536a
Showing
3 changed files
with
92 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:plaso_connect/constants/colors.dart'; | ||
import 'package:plaso_connect/screens/addoxygen.dart'; | ||
import 'package:plaso_connect/screens/showOxygenposts.dart'; | ||
import 'package:plaso_connect/widgets/boxdecoration.dart'; | ||
|
||
class SelectOxygen extends StatelessWidget { | ||
@override | ||
Widget build(BuildContext context) { | ||
return SafeArea( | ||
child: Scaffold( | ||
body: Column( | ||
mainAxisAlignment: MainAxisAlignment.center, | ||
crossAxisAlignment: CrossAxisAlignment.start, | ||
children: [ | ||
Padding( | ||
padding: const EdgeInsets.only(left: 30, bottom: 15), | ||
child: Text( | ||
"Choose an option :", | ||
style: TextStyle( | ||
color: kelectronBlue, | ||
fontSize: 22, | ||
fontWeight: FontWeight.w600, | ||
), | ||
), | ||
), | ||
selectOxygenButton( | ||
text: "Add a Source", | ||
onTap: () { | ||
Navigator.push( | ||
context, | ||
MaterialPageRoute(builder: (context) { | ||
return AddOxygenDetails(); | ||
}), | ||
); | ||
}, | ||
), | ||
selectOxygenButton( | ||
text: "Avaible Sources", | ||
onTap: () { | ||
Navigator.push( | ||
context, | ||
MaterialPageRoute(builder: (context) { | ||
return ShowOxygenPosts(); | ||
}), | ||
); | ||
}, | ||
), | ||
], | ||
), | ||
), | ||
); | ||
} | ||
|
||
Widget selectOxygenButton({ | ||
required String text, | ||
required Function onTap, | ||
}) { | ||
return GestureDetector( | ||
onTap: onTap as void Function()?, | ||
child: Container( | ||
margin: EdgeInsets.symmetric(horizontal: 30, vertical: 15), | ||
padding: EdgeInsets.all(15), | ||
decoration: newboxDecoration(), | ||
child: Center( | ||
child: Text( | ||
text, | ||
style: TextStyle( | ||
color: kelectronBlue, | ||
fontSize: 20, | ||
fontWeight: FontWeight.w600, | ||
), | ||
), | ||
), | ||
), | ||
); | ||
} | ||
} |