diff --git a/lib/main.dart b/lib/main.dart index c8f33fb..5557742 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:plaso_connect/constants/colors.dart'; -import 'package:plaso_connect/screens/selectplasma.dart'; +import 'package:plaso_connect/screens/homescreen.dart'; Future main() async { WidgetsFlutterBinding.ensureInitialized(); @@ -18,21 +18,19 @@ Future main() async { class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { - return SafeArea( - child: MaterialApp( - debugShowCheckedModeBanner: false, - theme: ThemeData( - textTheme: GoogleFonts.firaSansTextTheme( - Theme.of(context).textTheme, - ), - scaffoldBackgroundColor: kbackgroundLight, - primarySwatch: kelectronBlue, - accentColor: kelectronBlue, - primaryColor: kelectronBlue, - iconTheme: IconThemeData(color: kelectronBlue), + return MaterialApp( + debugShowCheckedModeBanner: false, + theme: ThemeData( + textTheme: GoogleFonts.firaSansTextTheme( + Theme.of(context).textTheme, ), - home: SelectPlasma(), + scaffoldBackgroundColor: kbackgroundLight, + primarySwatch: kelectronBlue, + accentColor: kelectronBlue, + primaryColor: kelectronBlue, + iconTheme: IconThemeData(color: kelectronBlue), ), + home: HomeScreen(), ); } } diff --git a/lib/screens/homescreen.dart b/lib/screens/homescreen.dart index 27934c1..7f68997 100644 --- a/lib/screens/homescreen.dart +++ b/lib/screens/homescreen.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:plaso_connect/constants/colors.dart'; +import 'package:plaso_connect/screens/selectoxygen.dart'; import 'package:plaso_connect/screens/selectplasma.dart'; import 'package:plaso_connect/screens/statdashboard.dart'; import 'package:plaso_connect/widgets/boxdecoration.dart'; @@ -52,7 +53,7 @@ class HomeScreen extends StatelessWidget { Navigator.push( context, MaterialPageRoute(builder: (context) { - return TotalStatsDashboard(); + return SelectOxygen(); }), ); }, diff --git a/lib/screens/selectoxygen.dart b/lib/screens/selectoxygen.dart new file mode 100644 index 0000000..445d33e --- /dev/null +++ b/lib/screens/selectoxygen.dart @@ -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, + ), + ), + ), + ), + ); + } +}