diff --git a/images/eye_icon.png b/images/eye_icon.png new file mode 100644 index 0000000..c6ea74d Binary files /dev/null and b/images/eye_icon.png differ diff --git a/images/final_splash_screen.jpg b/images/final_splash_screen.jpg new file mode 100644 index 0000000..70ab6fe Binary files /dev/null and b/images/final_splash_screen.jpg differ diff --git a/images/login_logo.png b/images/login_logo.png new file mode 100644 index 0000000..4706a67 Binary files /dev/null and b/images/login_logo.png differ diff --git a/images/open_eye.png b/images/open_eye.png new file mode 100644 index 0000000..dcc97fb Binary files /dev/null and b/images/open_eye.png differ diff --git a/lib/common/settings.dart b/lib/common/settings.dart new file mode 100644 index 0000000..94ea43e --- /dev/null +++ b/lib/common/settings.dart @@ -0,0 +1,64 @@ + + +import 'dart:io'; + +import 'package:flutter/material.dart'; +import 'package:google_fonts/google_fonts.dart'; + +const Color primaryColor = Color(0XFF1D7AFC); +const Color secondaryColor = Color(0XFFBFE0ED); +const Color greyColor = Color(0XFF7E7F80); + +TextStyle fontTextStyle(double fontSize,Color fontColor,FontWeight weight) { + return GoogleFonts.inter( + textStyle: TextStyle( + fontSize: fontSize, + fontWeight: weight, + color:fontColor, + ), + ); +} + +InputDecoration textFormFieldDecoration(IconData icon,var text){ + return InputDecoration( + counterText: '', + filled: false, + fillColor: Colors.white, + /*prefixIcon: Icon( + icon, + color: Colors.white, + ),*/ + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(4.0), + borderSide: BorderSide(color: greyColor, + width: 1, )), + focusedBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(4.0), + borderSide: BorderSide(color: Color(0XFF1D7AFC),width: 2,), + ), + + enabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(4.0), + borderSide: BorderSide(color: greyColor), + ), + labelText: text, + labelStyle:fontTextStyle(14,Color(0XFF7E7F80),FontWeight.w400), + /* TextStyle(color: greyColor, fontWeight: FontWeight.bold //<-- SEE HERE + ),*/ + ); +} + + +class AppSettings{ + static Future internetConnectivity() async { + try { + final result = await InternetAddress.lookup('google.com'); + if (result.isNotEmpty && result[0].rawAddress.isNotEmpty) { + return true; + } + } on SocketException catch (_) { + return false; + } + return false; + } +} \ No newline at end of file diff --git a/lib/common/splash_screen.dart b/lib/common/splash_screen.dart new file mode 100644 index 0000000..148d400 --- /dev/null +++ b/lib/common/splash_screen.dart @@ -0,0 +1,99 @@ +import 'dart:io'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:supplier_new/login/login.dart'; +import 'package:supplier_new/login/starting_screen.dart'; + +void main() async{ + SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]); + //FirebaseMessaging.onBackgroundMessage(_messageHandler); + runApp(new Splash()); +} + + +class Splash extends StatelessWidget { + // This widget is the root of your application. + @override + Widget build(BuildContext context) { + return MaterialApp( + debugShowCheckedModeBanner: false, + title: 'Water Management', + theme: new ThemeData( + primarySwatch: Colors.blue, + ), + home: new SplashScreen(), + ); + } +} + +class SplashScreen extends StatefulWidget { + const SplashScreen({ super.key }); + + @override + State createState() => _SplashScreenState(); +} + +class _SplashScreenState extends State { + + + Widget _defaultHome = new StartingScreen(); + + + /*void loginCheck()async{ + + bool _result = await AppSettings.isSigIn(); + + + *//*store device information in firebase*//* + try{ + if(Platform.isIOS){ + await FireBaseCore.init(); + } + //await FireBaseCore.init(); + await FireBaseCore.checkFcmTokenInFireStoreDbWithdeviceId(); + // AppSettings.fcmId=await AppSettings.getData('FCM_TOKEN', 'STRING'); + } + catch(e){ + print(e); + } + + if (_result) { + await AppSettings.loadDataFromMemory(); + AppSettings.fcmId=await AppSettings.getData('FCM_TOKEN', 'STRING'); + // await AppSettings.getProfile(); + _defaultHome = new DashboardScreen(); + } + }*/ + + + + + @override + void initState() { + + //loginCheck(); + super.initState(); + Future.delayed( + const Duration(seconds: 3), + () => Navigator.push( + context, + MaterialPageRoute(builder: (context) => _defaultHome), + )); + } + @override + Widget build(BuildContext context) { + return Scaffold( + body: Stack( + children: [ + Container( + decoration: const BoxDecoration( + image: DecorationImage(image: AssetImage("images/final_splash_screen.jpg"), fit: BoxFit.fill,), + ), + ), + + ], + ) + ); + } + +} \ No newline at end of file diff --git a/lib/login/login.dart b/lib/login/login.dart new file mode 100644 index 0000000..7d3a50d --- /dev/null +++ b/lib/login/login.dart @@ -0,0 +1,215 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:supplier_new/common/settings.dart'; + +class Login extends StatefulWidget { + const Login({super.key}); + + @override + State createState() => _LoginState(); +} + +class _LoginState extends State { + + + bool isObscureText=true; + TextEditingController mobileNumberController = TextEditingController(); + TextEditingController passwordController = TextEditingController(); + + + @override + void initState() { + isObscureText=true; + super.initState(); + } + + + Future onWillPop() async { + final shouldPop = await showDialog(context: context, builder: (context) { + return AlertDialog( + title: const Text('Do you want to exit app?', + style: TextStyle( + color: primaryColor, + fontSize: 20, + )), + actionsAlignment: MainAxisAlignment.spaceBetween, + actions: [ + TextButton( + onPressed: () { + SystemNavigator.pop(); + }, + child: const Text('Yes', + style: TextStyle( + color: primaryColor, + fontSize: 20, + )), + ), + TextButton( + onPressed: () { + Navigator.of(context).pop(false); + }, + child: const Text('No', + style: TextStyle( + color: primaryColor, + fontSize: 20, + )), + ), + ], + ); + }, + ); + return shouldPop!; + } + + @override + Widget build(BuildContext context) { + String lastInputValue=""; + + return WillPopScope( + onWillPop: () async => onWillPop(), + child: Scaffold( + backgroundColor: Colors.white, + body: Stack( + children: [ + /*Container( + decoration: const BoxDecoration( + image: DecorationImage(image: AssetImage("images/backgroundimage.png"), fit: BoxFit.cover,), + ), + ),*/ + GestureDetector( + onTap: () { + FocusManager.instance.primaryFocus?.unfocus(); + }, + child: SafeArea( + child: SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.fromLTRB(24, 0, 24, 0), + child: Column( + + children: [ + Image( + image: const AssetImage('images/login_logo.png'), + height: MediaQuery.of(context).size.height * .30, + width:MediaQuery.of(context).size.width * .30, + ), + + SizedBox(height:MediaQuery.of(context).size.height * .04,), + /*Align( + alignment: Alignment.bottomLeft, + child: Text('Welcome!', style:fontTextStyle(24,Color(0XFF1C1E20),FontWeight.w800) + + *//*style: GoogleFonts.inter( + textStyle: TextStyle( + fontSize: 24, + fontWeight: FontWeight.bold, + color: Colors.black, + ), + ),*//*), + ),*/ + SizedBox(height:MediaQuery.of(context).size.height * .024,), + Container( + child: TextFormField( + controller: mobileNumberController, + keyboardType: TextInputType.number, + textCapitalization: TextCapitalization.sentences, + maxLength: 10, + decoration: textFormFieldDecoration(Icons.phone,'Mobile Number'), + style:fontTextStyle(14,Color(0XFF101214),FontWeight.w400), + cursorColor: Color(0XFF1D7AFC), + + //TextStyle(color: Colors.black,fontWeight: FontWeight.bold), + ), + ), + SizedBox(height:MediaQuery.of(context).size.height * .016,), + + Container( + child: TextFormField( + cursorColor:Color(0XFF1D7AFC), + obscureText: isObscureText, + obscuringCharacter: '*', + controller: passwordController, + decoration: InputDecoration( + filled: false, + fillColor: Colors.white, + labelText: 'Password', + //prefixIcon: const Icon(Icons.lock, color: Colors.white,), + labelStyle: fontTextStyle(14,Color(0XFF7E7F80),FontWeight.w400), + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(4.0), + borderSide: BorderSide(color: greyColor, + width: 1, )), + focusedBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(4.0), + borderSide: BorderSide(color: Color(0XFF1D7AFC),width: 2,), + ), + enabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(4.0), + borderSide: BorderSide(color: greyColor), + ), + + suffixIcon: IconButton( + icon: isObscureText==true?Image.asset('images/eye_icon.png',color: Color(0XFF7E7F80),width: 30,height: 30,):Image.asset('images/open_eye.png',color:Color(0XFF7E7F80),width: 30,height: 30,), + /* Icon( + icon:Image.asset('assets/your_image.png'), + color: isObscureText==true?greyColor:primaryColor, + ),*/ + onPressed: () { + + print("show password"); + setState(() { + isObscureText = !isObscureText; + }); + }, + ), + + ), + style: fontTextStyle(14,Color(0XFF101214),FontWeight.w400), + + ), + ), + + SizedBox(height:MediaQuery.of(context).size.height * .016,), + Align( + alignment: Alignment.bottomLeft, + child:GestureDetector( + onTap: (){ + /*Navigator.push( + context, + MaterialPageRoute(builder: (context) => ForgotpasswordNew()), + );*/ + }, + child: Text( + 'Forgot Password?', + style: fontTextStyle(12,Color(0XFF1D7AFC),FontWeight.w600), + + ), + ) + ), + SizedBox(height:MediaQuery.of(context).size.height * .024,), + Container( + width:double.infinity, + height: MediaQuery.of(context).size.height * .06, + child: ElevatedButton( + style: ElevatedButton.styleFrom( + foregroundColor: Colors.white, + backgroundColor: primaryColor, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(24.0), // Customize the radius + ), + ), + onPressed: () async{ + + }, + child: Text('Login',style: fontTextStyle(12,Colors.white,FontWeight.w600),), + )), + ], + ), + ) + )), + ), + ], + ) + ), + ); + } +} diff --git a/lib/login/login_signup_screen.dart b/lib/login/login_signup_screen.dart new file mode 100644 index 0000000..a28b7b6 --- /dev/null +++ b/lib/login/login_signup_screen.dart @@ -0,0 +1,97 @@ +import 'package:flutter/material.dart'; +import 'package:supplier_new/common/settings.dart'; +import 'package:supplier_new/login/login.dart'; + +class LoginSignUpScreen extends StatefulWidget { + const LoginSignUpScreen({super.key}); + + @override + State createState() => _LoginSignUpScreenState(); +} + +class _LoginSignUpScreenState extends State { + @override + Widget build(BuildContext context) { + return SafeArea( + child: Scaffold( + body: Padding( + padding: EdgeInsets.all(24), + child: Column( + children: [ + SizedBox(height: MediaQuery.of(context).size.height * .2), + Center( + child: Text("AQUICK SUPPLIER", + style: fontTextStyle(20, Color(0XFF515253), FontWeight.w800)), + ), + SizedBox(height: MediaQuery.of(context).size.height * .05), + CircleAvatar(radius: 80, backgroundColor: Color(0XFFC9DFFE)), + SizedBox(height: MediaQuery.of(context).size.height * .05), + Center( + child: Text( + "Welcome to Aquick Supplier", + style: fontTextStyle(20, Color(0XFF343637), FontWeight.w700), + ), + ), + SizedBox(height: MediaQuery.of(context).size.height * .012), + Center( + child: Text( + "Sign up or login to be listed as a supplier, start deliveries and track orders", + style: fontTextStyle(12, Color(0XFF7E7F80), FontWeight.w400), + textAlign: TextAlign.center, // Keeps text centered in multiple lines + ), + ) + , + SizedBox(height: MediaQuery.of(context).size.height * .04), + Container( + width:double.infinity, + height: MediaQuery.of(context).size.height * .06, + child: ElevatedButton( + style: ElevatedButton.styleFrom( + foregroundColor: Colors.white, + backgroundColor: primaryColor, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(24.0), // Customize the radius + ), + ), + onPressed: () async{ + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => Login()), + ); + }, + child: Text('Login',style: fontTextStyle(14,Colors.white,FontWeight.w500),), + )), + SizedBox(height: MediaQuery.of(context).size.height * .012), + Container( + width: double.infinity, + height: MediaQuery.of(context).size.height * .06, + child: ElevatedButton( + style: ElevatedButton.styleFrom( + foregroundColor: Color(0XFF757575), + backgroundColor: Colors.white, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(24.0), // Customize the radius + side: BorderSide( + color: Color(0XFF757575), // Border color + width: 1, // Border width + ), + ), + ), + onPressed: () async { + // Your onPressed logic + }, + child: Text( + 'Sign up', + style: fontTextStyle(12, Color(0XFF757575), FontWeight.w500), + ), + ), + ) + + ], + ), + ) + ), + ); + } +} diff --git a/lib/login/starting_screen.dart b/lib/login/starting_screen.dart new file mode 100644 index 0000000..740ed57 --- /dev/null +++ b/lib/login/starting_screen.dart @@ -0,0 +1,89 @@ +import 'package:flutter/material.dart'; +import 'package:supplier_new/common/settings.dart'; +import 'package:supplier_new/login/login_signup_screen.dart'; + +class StartingScreen extends StatefulWidget { + const StartingScreen({super.key}); + + @override + State createState() => _StartingScreenState(); +} + +class _StartingScreenState extends State { + @override + Widget build(BuildContext context) { + return SafeArea( + child: Scaffold( + body: Padding( + padding: EdgeInsets.all(24), + child: Column( + children: [ + SizedBox(height: MediaQuery.of(context).size.height * .2), + Center( + child: Text("AQUICK SUPPLIER", + style: fontTextStyle(20, Color(0XFF515253), FontWeight.w800)), + ), + SizedBox(height: MediaQuery.of(context).size.height * .05), + CircleAvatar(radius: 80, backgroundColor: Color(0XFFC9DFFE)), + SizedBox(height: MediaQuery.of(context).size.height * .05), + Center( + child: Text("Want to be a supplier on Aquick Tankers?", + style: fontTextStyle(16, Color(0XFF343637), FontWeight.w600)), + ), + SizedBox(height: MediaQuery.of(context).size.height * .04), + Container( + width: double.infinity, + height: MediaQuery.of(context).size.height * .06, + child: ElevatedButton( + style: ElevatedButton.styleFrom( + foregroundColor: Colors.white, + backgroundColor: primaryColor, + shape: RoundedRectangleBorder( + borderRadius: + BorderRadius.circular(24.0), // Customize the radius + ), + ), + onPressed: () async { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => LoginSignUpScreen()), + ); + }, + child: Text( + 'Yes', + style: fontTextStyle(14, Colors.white, FontWeight.w500), + ), + )), + SizedBox(height: MediaQuery.of(context).size.height * .012), + Container( + width: double.infinity, + height: MediaQuery.of(context).size.height * .06, + child: ElevatedButton( + style: ElevatedButton.styleFrom( + foregroundColor: Color(0XFF757575), + backgroundColor: Colors.white, + shape: RoundedRectangleBorder( + borderRadius: + BorderRadius.circular(24.0), // Customize the radius + side: BorderSide( + color: Color(0XFF757575), // Border color + width: 1, // Border width + ), + ), + ), + onPressed: () async { + // Your onPressed logic + }, + child: Text( + 'No, I want to buy water', + style: fontTextStyle(12, Color(0XFF757575), FontWeight.w500), + ), + ), + ) + ], + ), + )), + ); + } +} diff --git a/lib/main.dart b/lib/main.dart index 8e94089..4f11f8e 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,125 +1,29 @@ import 'package:flutter/material.dart'; +import 'package:supplier_new/common/splash_screen.dart'; -void main() { - runApp(const MyApp()); + +void main() async { + WidgetsFlutterBinding.ensureInitialized(); + + runApp(MyApp()); } -class MyApp extends StatelessWidget { - const MyApp({super.key}); +// Create a global navigator key +final GlobalKey navigatorKey = GlobalKey(); - // This widget is the root of your application. +class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( - title: 'Flutter Demo', + debugShowCheckedModeBanner: false, + title: 'Water Management App', + navigatorKey: navigatorKey, // Set the navigator key theme: ThemeData( - // This is the theme of your application. - // - // TRY THIS: Try running your application with "flutter run". You'll see - // the application has a purple toolbar. Then, without quitting the app, - // try changing the seedColor in the colorScheme below to Colors.green - // and then invoke "hot reload" (save your changes or press the "hot - // reload" button in a Flutter-supported IDE, or press "r" if you used - // the command line to start the app). - // - // Notice that the counter didn't reset back to zero; the application - // state is not lost during the reload. To reset the state, use hot - // restart instead. - // - // This works for code too, not just values: Most code changes can be - // tested with just a hot reload. colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), useMaterial3: true, ), - home: const MyHomePage(title: 'Flutter Demo Home Page'), + home: SplashScreen(), // Your initial screen ); } } -class MyHomePage extends StatefulWidget { - const MyHomePage({super.key, required this.title}); - - // This widget is the home page of your application. It is stateful, meaning - // that it has a State object (defined below) that contains fields that affect - // how it looks. - - // This class is the configuration for the state. It holds the values (in this - // case the title) provided by the parent (in this case the App widget) and - // used by the build method of the State. Fields in a Widget subclass are - // always marked "final". - - final String title; - - @override - State createState() => _MyHomePageState(); -} - -class _MyHomePageState extends State { - int _counter = 0; - - void _incrementCounter() { - setState(() { - // This call to setState tells the Flutter framework that something has - // changed in this State, which causes it to rerun the build method below - // so that the display can reflect the updated values. If we changed - // _counter without calling setState(), then the build method would not be - // called again, and so nothing would appear to happen. - _counter++; - }); - } - - @override - Widget build(BuildContext context) { - // This method is rerun every time setState is called, for instance as done - // by the _incrementCounter method above. - // - // The Flutter framework has been optimized to make rerunning build methods - // fast, so that you can just rebuild anything that needs updating rather - // than having to individually change instances of widgets. - return Scaffold( - appBar: AppBar( - // TRY THIS: Try changing the color here to a specific color (to - // Colors.amber, perhaps?) and trigger a hot reload to see the AppBar - // change color while the other colors stay the same. - backgroundColor: Theme.of(context).colorScheme.inversePrimary, - // Here we take the value from the MyHomePage object that was created by - // the App.build method, and use it to set our appbar title. - title: Text(widget.title), - ), - body: Center( - // Center is a layout widget. It takes a single child and positions it - // in the middle of the parent. - child: Column( - // Column is also a layout widget. It takes a list of children and - // arranges them vertically. By default, it sizes itself to fit its - // children horizontally, and tries to be as tall as its parent. - // - // Column has various properties to control how it sizes itself and - // how it positions its children. Here we use mainAxisAlignment to - // center the children vertically; the main axis here is the vertical - // axis because Columns are vertical (the cross axis would be - // horizontal). - // - // TRY THIS: Invoke "debug painting" (choose the "Toggle Debug Paint" - // action in the IDE, or press "p" in the console), to see the - // wireframe for each widget. - mainAxisAlignment: MainAxisAlignment.center, - children: [ - const Text( - 'You have pushed the button this many times:', - ), - Text( - '$_counter', - style: Theme.of(context).textTheme.headlineMedium, - ), - ], - ), - ), - floatingActionButton: FloatingActionButton( - onPressed: _incrementCounter, - tooltip: 'Increment', - child: const Icon(Icons.add), - ), // This trailing comma makes auto-formatting nicer for build methods. - ); - } -} diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index cccf817..e777c67 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -5,6 +5,8 @@ import FlutterMacOS import Foundation +import path_provider_foundation func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { + PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) } diff --git a/pubspec.lock b/pubspec.lock index 6cb5f72..75fba8d 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -41,6 +41,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.18.0" + crypto: + dependency: transitive + description: + name: crypto + sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" + url: "https://pub.dev" + source: hosted + version: "3.0.6" cupertino_icons: dependency: "direct main" description: @@ -57,6 +65,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.1" + ffi: + dependency: transitive + description: + name: ffi + sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" + url: "https://pub.dev" + source: hosted + version: "2.1.3" flutter: dependency: "direct main" description: flutter @@ -75,6 +91,30 @@ packages: description: flutter source: sdk version: "0.0.0" + google_fonts: + dependency: "direct main" + description: + name: google_fonts + sha256: "2776c66b3e97c6cdd58d1bd3281548b074b64f1fd5c8f82391f7456e38849567" + url: "https://pub.dev" + source: hosted + version: "4.0.5" + http: + dependency: transitive + description: + name: http + sha256: bb2ce4590bc2667c96f318d68cac1b5a7987ec819351d32b1c987239a815e007 + url: "https://pub.dev" + source: hosted + version: "1.5.0" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" + source: hosted + version: "4.0.2" leak_tracker: dependency: transitive description: @@ -139,6 +179,70 @@ packages: url: "https://pub.dev" source: hosted version: "1.9.0" + path_provider: + dependency: transitive + description: + name: path_provider + sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd" + url: "https://pub.dev" + source: hosted + version: "2.1.5" + path_provider_android: + dependency: transitive + description: + name: path_provider_android + sha256: "6f01f8e37ec30b07bc424b4deabac37cacb1bc7e2e515ad74486039918a37eb7" + url: "https://pub.dev" + source: hosted + version: "2.2.10" + path_provider_foundation: + dependency: transitive + description: + name: path_provider_foundation + sha256: "4843174df4d288f5e29185bd6e72a6fbdf5a4a4602717eed565497429f179942" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 + url: "https://pub.dev" + source: hosted + version: "2.2.1" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + path_provider_windows: + dependency: transitive + description: + name: path_provider_windows + sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 + url: "https://pub.dev" + source: hosted + version: "2.3.0" + platform: + dependency: transitive + description: + name: platform + sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" + url: "https://pub.dev" + source: hosted + version: "3.1.6" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" + source: hosted + version: "2.1.8" sky_engine: dependency: transitive description: flutter @@ -192,6 +296,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.7.0" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + url: "https://pub.dev" + source: hosted + version: "1.3.2" vector_math: dependency: transitive description: @@ -208,6 +320,22 @@ packages: url: "https://pub.dev" source: hosted version: "14.2.1" + web: + dependency: transitive + description: + name: web + sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a" + url: "https://pub.dev" + source: hosted + version: "1.1.1" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15" + url: "https://pub.dev" + source: hosted + version: "1.1.0" sdks: dart: ">=3.4.4 <4.0.0" - flutter: ">=3.18.0-18.0.pre.54" + flutter: ">=3.22.0" diff --git a/pubspec.yaml b/pubspec.yaml index b006af3..7dc80f5 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,90 +1,29 @@ name: supplier_new description: "A new Flutter project." -# The following line prevents the package from being accidentally published to -# pub.dev using `flutter pub publish`. This is preferred for private packages. -publish_to: 'none' # Remove this line if you wish to publish to pub.dev -# The following defines the version and build number for your application. -# A version number is three numbers separated by dots, like 1.2.43 -# followed by an optional build number separated by a +. -# Both the version and the builder number may be overridden in flutter -# build by specifying --build-name and --build-number, respectively. -# In Android, build-name is used as versionName while build-number used as versionCode. -# Read more about Android versioning at https://developer.android.com/studio/publish/versioning -# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion. -# Read more about iOS versioning at -# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -# In Windows, build-name is used as the major, minor, and patch parts -# of the product and file versions while build-number is used as the build suffix. +publish_to: 'none' + version: 1.0.0+1 environment: sdk: '>=3.4.4 <4.0.0' -# Dependencies specify other packages that your package needs in order to work. -# To automatically upgrade your package dependencies to the latest versions -# consider running `flutter pub upgrade --major-versions`. Alternatively, -# dependencies can be manually updated by changing the version numbers below to -# the latest version available on pub.dev. To see which dependencies have newer -# versions available, run `flutter pub outdated`. dependencies: flutter: sdk: flutter - - # The following adds the Cupertino Icons font to your application. - # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.6 + google_fonts: ^4.0.4 dev_dependencies: flutter_test: sdk: flutter - # The "flutter_lints" package below contains a set of recommended lints to - # encourage good coding practices. The lint set provided by the package is - # activated in the `analysis_options.yaml` file located at the root of your - # package. See that file for information about deactivating specific lint - # rules and activating additional ones. flutter_lints: ^3.0.0 -# For information on the generic Dart part of this file, see the -# following page: https://dart.dev/tools/pub/pubspec - -# The following section is specific to Flutter packages. flutter: - # The following line ensures that the Material Icons font is - # included with your application, so that you can use the icons in - # the material Icons class. - uses-material-design: true - - # To add assets to your application, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg - - # An image asset can refer to one or more resolution-specific "variants", see - # https://flutter.dev/assets-and-images/#resolution-aware - # For details regarding adding assets from package dependencies, see - # https://flutter.dev/assets-and-images/#from-packages - - # To add custom fonts to your application, add a fonts section here, - # in this "flutter" section. Each entry in this list should have a - # "family" key with the font family name, and a "fonts" key with a - # list giving the asset and other descriptors for the font. For - # example: - # fonts: - # - family: Schyler - # fonts: - # - asset: fonts/Schyler-Regular.ttf - # - asset: fonts/Schyler-Italic.ttf - # style: italic - # - family: Trajan Pro - # fonts: - # - asset: fonts/TrajanPro.ttf - # - asset: fonts/TrajanPro_Bold.ttf - # weight: 700 - # - # For details regarding fonts from package dependencies, - # see https://flutter.dev/custom-fonts/#from-packages + uses-material-design: true + assets: + - images/ diff --git a/test/widget_test.dart b/test/widget_test.dart index 8615f9d..335fa9a 100644 --- a/test/widget_test.dart +++ b/test/widget_test.dart @@ -7,13 +7,14 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; +import 'package:supplier_new/common/splash_screen.dart'; import 'package:supplier_new/main.dart'; void main() { testWidgets('Counter increments smoke test', (WidgetTester tester) async { // Build our app and trigger a frame. - await tester.pumpWidget(const MyApp()); + await tester.pumpWidget( Splash()); // Verify that our counter starts at 0. expect(find.text('0'), findsOneWidget);