diff --git a/Screenshot_2023-02-17-16-43-40-96_b8dbfcfcabf6e03cb7ab2178bebf8630.jpg b/Screenshot_2023-02-17-16-43-40-96_b8dbfcfcabf6e03cb7ab2178bebf8630.jpg new file mode 100644 index 0000000..962a8e6 Binary files /dev/null and b/Screenshot_2023-02-17-16-43-40-96_b8dbfcfcabf6e03cb7ab2178bebf8630.jpg differ diff --git a/Screenshot_2023-02-17-17-03-11-99_b8dbfcfcabf6e03cb7ab2178bebf8630.jpg b/Screenshot_2023-02-17-17-03-11-99_b8dbfcfcabf6e03cb7ab2178bebf8630.jpg new file mode 100644 index 0000000..9df95ca Binary files /dev/null and b/Screenshot_2023-02-17-17-03-11-99_b8dbfcfcabf6e03cb7ab2178bebf8630.jpg differ diff --git a/fuel_ease_app/analysis_options.yaml b/fuel_ease_app/analysis_options.yaml index 61b6c4d..d5a9cb0 100644 --- a/fuel_ease_app/analysis_options.yaml +++ b/fuel_ease_app/analysis_options.yaml @@ -9,6 +9,7 @@ # packages, and plugins designed to encourage good coding practices. include: package:flutter_lints/flutter.yaml + linter: # The lint rules applied to this project can be customized in the # section below to disable rules from the `package:flutter_lints/flutter.yaml` diff --git a/fuel_ease_app/lib/main.dart b/fuel_ease_app/lib/main.dart index 604f7fb..15a0189 100644 --- a/fuel_ease_app/lib/main.dart +++ b/fuel_ease_app/lib/main.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:fuel_ease_app/screens/rate_us_page1.dart'; void main() { runApp(const MyApp()); @@ -10,16 +11,14 @@ class MyApp extends StatelessWidget { // This widget is the root of your application. @override Widget build(BuildContext context) { + return MaterialApp( + debugShowCheckedModeBanner: false, title: 'Flutter Demo', theme: ThemeData( primarySwatch: Colors.blue, ), - home: const Scaffold( - body: Center( - child: Text('Sample Home Page'), - ), - ), + home: const RatingPage(), ); } } diff --git a/fuel_ease_app/lib/screens/rate_us_page1.dart b/fuel_ease_app/lib/screens/rate_us_page1.dart new file mode 100644 index 0000000..cb24eca --- /dev/null +++ b/fuel_ease_app/lib/screens/rate_us_page1.dart @@ -0,0 +1,161 @@ + + +import 'package:flutter/material.dart'; +import 'package:flutter_rating_bar/flutter_rating_bar.dart'; + +class RatingPage extends StatefulWidget { + const RatingPage({super.key}); + + @override + State createState() => _RatingPageState(); +} + + + +class _RatingPageState extends State { + @override + Widget build(BuildContext context) { + Future openDialog() => showDialog( + context: context, + builder: (context) => AlertDialog( + icon: Icon(Icons.thumb_up,size:200.0 ,color: Color.fromARGB(255, 237, 160, 169),), + title: Text("Thank you!",style: TextStyle(fontSize: 20,color: Colors.black26),), + content: Text("Thank you for sharing your valuable review and rating us"), + ), + ); + return Scaffold( + appBar: AppBar( + backgroundColor: Color.fromARGB(60, 236, 193, 193), + title: Center(child: const Text('Rate Us')), + ), + backgroundColor: Colors.white, + body: SafeArea( + child: Center( + child: Column( + children: [ + //icon + CircleAvatar( + radius: 210.0, + backgroundColor: Color.fromARGB(255, 235, 236, 236), + backgroundImage: NetworkImage( + "https://cdn5.vectorstock.com/i/1000x1000/13/54/high-rating-color-icon-vector-29051354.jpg", + ), + ), + Center( + child: Text("Review Refuelers to help us improve"), + ), + SizedBox( + height: 10, + ), + //dialogbox + RatingBar.builder( + initialRating: 3, + minRating: 1, + direction: Axis.horizontal, + allowHalfRating: true, + itemCount: 5, + itemPadding: EdgeInsets.symmetric(horizontal: 4.0), + itemBuilder: (context, _) => Icon( + Icons.star, + color: Colors.amber, + ), + onRatingUpdate: (rating) { + print(rating); + }, + ), + SizedBox( + height: 20, + ), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 15.0), + child: Container( + height: 100.0, + decoration: BoxDecoration( + color: Color.fromARGB(255, 240, 172, 172), + border: + Border.all(color: Color.fromARGB(255, 214, 205, 205)), + borderRadius: BorderRadius.circular(15), + ), + child: Padding( + padding: const EdgeInsets.only(left: 18.0), + child: TextField( + maxLines: null, + keyboardType: TextInputType.multiline, + expands: true, + decoration: InputDecoration( + border: InputBorder.none, + hintText: 'Write your reviews here', + ), + ), + ), + ), + ), + Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.only(left: 11.0), + child: TextButton( + onPressed: (() {}), + child: Container( + height: 40.0, + width: 85.0, + decoration: BoxDecoration( + color: Color.fromARGB(255, 244, 164, 164), + border: Border.all( + color: Color.fromARGB(255, 51, 49, 49)), + borderRadius: BorderRadius.circular(10), + ), + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 20.0, vertical: 7.0), + child: Text( + "Later", + selectionColor: Colors.black, + style: TextStyle( + color: Color.fromARGB(255, 112, 34, 34), + fontSize: 18.0), + ), + ), + )), + ), + SizedBox( + width: 100.0, + ), + Padding( + padding: const EdgeInsets.only(left: 11.0), + child: TextButton( + onPressed: (() { + openDialog(); + }), + child: Container( + height: 40.0, + width: 105.0, + decoration: BoxDecoration( + color: Color.fromARGB(255, 225, 214, 214), + border: Border.all( + color: Color.fromARGB(255, 51, 49, 49)), + borderRadius: BorderRadius.circular(10), + ), + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 20.0, vertical: 7.0), + child: Text( + "Submit", + selectionColor: Colors.black, + style: TextStyle( + color: Color.fromARGB(255, 112, 34, 34), + fontSize: 18.0), + ), + ), + )), + ) + ], + ), + ], + ), + ), + ), + ); + } +} diff --git a/fuel_ease_app/pubspec.lock b/fuel_ease_app/pubspec.lock index 0f3a736..e17d935 100644 --- a/fuel_ease_app/pubspec.lock +++ b/fuel_ease_app/pubspec.lock @@ -62,6 +62,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.1" + flutter_rating_bar: + dependency: "direct main" + description: + name: flutter_rating_bar + url: "https://pub.dartlang.org" + source: hosted + version: "4.0.1" flutter_test: dependency: "direct dev" description: flutter @@ -157,4 +164,5 @@ packages: source: hosted version: "2.1.2" sdks: - dart: ">=2.18.6 <3.0.0" + dart: ">=2.18.5 <3.0.0" + flutter: ">=2.5.0" diff --git a/fuel_ease_app/pubspec.yaml b/fuel_ease_app/pubspec.yaml index 24526e2..947c770 100644 --- a/fuel_ease_app/pubspec.yaml +++ b/fuel_ease_app/pubspec.yaml @@ -20,7 +20,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: '>=2.18.6 <3.0.0' + sdk: '>=2.18.5 <3.0.0' # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions @@ -29,17 +29,12 @@ environment: # the latest version available on pub.dev. To see which dependencies have newer # versions available, run `flutter pub outdated`. dependencies: + cupertino_icons: ^1.0.2 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.2 + flutter_rating_bar: ^4.0.0 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 @@ -47,10 +42,11 @@ dev_dependencies: # package. See that file for information about deactivating specific lint # rules and activating additional ones. flutter_lints: ^2.0.0 + flutter_test: + sdk: flutter # 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: @@ -58,18 +54,15 @@ flutter: # 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 - + # - images/ratingicon.jpg # 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