From ed5521e2c0146c958c203faa6f465f91f60fb42c Mon Sep 17 00:00:00 2001 From: Rushikesh Patade Date: Fri, 28 Oct 2022 22:32:31 +0530 Subject: [PATCH 1/7] refresh on pull implemented for group screen tabs --- lib/components/hike_button.dart | 8 +- lib/views/auth_screen.dart | 199 +++++++++++----------- lib/views/group_screen.dart | 281 ++++++++++++++++++++++---------- pubspec.lock | 7 + pubspec.yaml | 1 + 5 files changed, 319 insertions(+), 177 deletions(-) diff --git a/lib/components/hike_button.dart b/lib/components/hike_button.dart index 6344178f..55d65f03 100644 --- a/lib/components/hike_button.dart +++ b/lib/components/hike_button.dart @@ -22,12 +22,16 @@ class HikeButton extends StatelessWidget { @override Widget build(BuildContext context) { + final Size screensize = MediaQuery.of(context).size; return ElevatedButton( style: ElevatedButton.styleFrom( primary: buttonColor, shape: RoundedRectangleBorder( - borderRadius: new BorderRadius.circular(50.0), - side: BorderSide(color: borderColor)), + borderRadius: new BorderRadius.circular(screensize.width / 20), + side: BorderSide( + color: borderColor, + ), + ), ), child: Padding( padding: EdgeInsets.symmetric( diff --git a/lib/views/auth_screen.dart b/lib/views/auth_screen.dart index 541fc61a..7eb0ca23 100644 --- a/lib/views/auth_screen.dart +++ b/lib/views/auth_screen.dart @@ -202,83 +202,88 @@ class _AuthScreenState extends State child: Column( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Card( - elevation: 2.0, - color: Colors.white, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(8.0), - ), - child: Form( - key: model.formKeyLogin, - autovalidateMode: model.loginValidate, - child: Container( - width: screensize.width - 70, - child: Column( - children: [ - Container( - height: 13.h, - padding: EdgeInsets.symmetric( - horizontal: 10, vertical: 10.0), - child: TextFormField( - autovalidateMode: model.loginValidate, - focusNode: model.emailLogin, - controller: model.loginEmailController, - validator: (value) => - Validator.validateEmail(value.trimRight()), - keyboardType: TextInputType.emailAddress, - style: TextStyle(fontSize: 16.0, color: Colors.black), - decoration: InputDecoration( - border: InputBorder.none, - icon: Icon( - Icons.mail_outline, - color: Colors.black, - size: 24.0, - ), - hintText: "Email Address", - hintStyle: TextStyle( - fontSize: hintsize - 2, color: hintColor), + Form( + key: model.formKeyLogin, + autovalidateMode: model.loginValidate, + child: Wrap( + children: [ + Card( + elevation: 5.0, + color: Colors.white, + shape: RoundedRectangleBorder( + borderRadius: + BorderRadius.circular(screensize.width / 20), + ), + child: Container( + // height: 13.h, + padding: EdgeInsets.symmetric( + horizontal: 10, + vertical: 10, + ), + child: TextFormField( + autovalidateMode: model.loginValidate, + focusNode: model.emailLogin, + controller: model.loginEmailController, + validator: (value) => + Validator.validateEmail(value.trimRight()), + keyboardType: TextInputType.emailAddress, + style: TextStyle(fontSize: 16.0, color: Colors.black), + decoration: InputDecoration( + border: InputBorder.none, + icon: Icon( + Icons.mail_outline, + color: Colors.black, + size: 24.0, ), + hintText: "Email Address", + hintStyle: TextStyle( + fontSize: hintsize - 2, color: hintColor), ), ), - separator(), - Container( - height: 13.h, - padding: EdgeInsets.symmetric( - horizontal: 10, vertical: 10.0), - child: TextFormField( - autovalidateMode: model.loginValidate, - focusNode: model.passwordLogin, - controller: model.loginPasswordController, - obscureText: model.obscureTextLogin, - validator: (value) => - Validator.validatePassword(value), - style: TextStyle(fontSize: 16.0, color: Colors.black), - decoration: InputDecoration( - border: InputBorder.none, + ), + ), + Card( + elevation: 5.0, + color: Colors.white, + shape: RoundedRectangleBorder( + borderRadius: + BorderRadius.circular(screensize.width / 20), + ), + child: Container( + padding: + EdgeInsets.symmetric(horizontal: 10, vertical: 10.0), + child: TextFormField( + autovalidateMode: model.loginValidate, + focusNode: model.passwordLogin, + controller: model.loginPasswordController, + obscureText: model.obscureTextLogin, + validator: (value) => Validator.validatePassword(value), + style: TextStyle(fontSize: 16.0, color: Colors.black), + decoration: InputDecoration( + border: InputBorder.none, + icon: Icon( + Icons.lock, + size: 24.0, + color: Colors.black, + ), + hintText: "Password", + hintStyle: TextStyle( + fontSize: hintsize - 2, color: hintColor), + suffixIcon: IconButton( + onPressed: () => model.displayPasswordLogin(), icon: Icon( - Icons.lock, - size: 24.0, + model.obscureTextLogin + ? Icons.visibility + : Icons.visibility_off, + size: 20.0, color: Colors.black, ), - hintText: "Password", - hintStyle: TextStyle( - fontSize: hintsize - 2, color: hintColor), - suffixIcon: IconButton( - onPressed: () => model.displayPasswordLogin(), - icon: Icon( - model.obscureTextLogin - ? Icons.visibility - : Icons.visibility_off, - size: 20.0, - color: Colors.black, - ), - ), ), ), ), - ], + ), ), - ), + ], ), ), SizedBox( @@ -292,7 +297,7 @@ class _AuthScreenState extends State padding: EdgeInsets.only( left: 15.0, right: 15.0, top: 15.0, bottom: 15.0), child: Text( - "Or", + "OR", style: TextStyle( color: Colors.black, fontSize: 16.0, @@ -316,21 +321,21 @@ class _AuthScreenState extends State padding: EdgeInsets.only(top: 3.h, left: 8.5.w, right: 8.5.w), child: Column( children: [ - Card( - elevation: 2.0, - color: Colors.white, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(8.0), - ), - child: Form( - key: model.formKeySignup, - autovalidateMode: model.signupValidate, - child: Container( - width: screensize.width - 70, - // height: 280.0, - child: Column(children: [ - Container( - height: 13.h, + Form( + key: model.formKeySignup, + autovalidateMode: model.signupValidate, + child: Container( + width: screensize.width - 70, + // height: 280.0, + child: Column(children: [ + Card( + elevation: 5, + color: Colors.white, + shape: RoundedRectangleBorder( + borderRadius: + BorderRadius.circular(screensize.width / 20), + ), + child: Container( padding: EdgeInsets.symmetric( horizontal: 10, vertical: 10.0), child: TextFormField( @@ -355,9 +360,15 @@ class _AuthScreenState extends State ), ), ), - separator(), - Container( - height: 13.h, + ), + Card( + elevation: 5, + color: Colors.white, + shape: RoundedRectangleBorder( + borderRadius: + BorderRadius.circular(screensize.width / 20), + ), + child: Container( padding: EdgeInsets.symmetric( horizontal: 10, vertical: 10.0), child: TextFormField( @@ -381,9 +392,15 @@ class _AuthScreenState extends State ), ), ), - separator(), - Container( - height: 13.h, + ), + Card( + elevation: 5, + color: Colors.white, + shape: RoundedRectangleBorder( + borderRadius: + BorderRadius.circular(screensize.width / 20), + ), + child: Container( padding: EdgeInsets.symmetric( horizontal: 10, vertical: 10.0), child: TextFormField( @@ -418,8 +435,8 @@ class _AuthScreenState extends State ), ), ), - ])), - ), + ), + ])), ), SizedBox( height: 3.5.h, diff --git a/lib/views/group_screen.dart b/lib/views/group_screen.dart index 68be5672..f5649a44 100644 --- a/lib/views/group_screen.dart +++ b/lib/views/group_screen.dart @@ -8,6 +8,7 @@ import 'package:beacon/models/beacon/beacon.dart'; import 'package:beacon/utilities/constants.dart'; import 'package:beacon/view_model/group_screen_view_model.dart'; import 'package:beacon/views/base_view.dart'; +import 'package:custom_refresh_indicator/custom_refresh_indicator.dart'; import 'package:flutter/material.dart'; import 'package:modal_progress_hud/modal_progress_hud.dart'; import 'package:sizer/sizer.dart'; @@ -26,6 +27,7 @@ class _GroupScreenState extends State with TickerProviderStateMixin { var fetchingUserBeacons; var fetchingNearbyBeacons; + TabControllerStorage tabControllerStorage = TabControllerStorage(); @override void initState() { @@ -35,6 +37,19 @@ class _GroupScreenState extends State super.initState(); } + void reloadNearByBeacons() { + setState(() { + fetchingNearbyBeacons = + databaseFunctions.fetchNearbyBeacon(widget.group.id); + }); + } + + void reloadUserBeacons() { + setState(() { + fetchingUserBeacons = databaseFunctions.fetchUserBeacons(widget.group.id); + }); + } + void reloadList() { setState(() { fetchingUserBeacons = databaseFunctions.fetchUserBeacons(widget.group.id); @@ -46,7 +61,11 @@ class _GroupScreenState extends State @override Widget build(BuildContext context) { return BaseView(builder: (context, model, child) { - TabController tabController = new TabController(length: 2, vsync: this); + TabController tabController = new TabController( + length: 2, + vsync: this, + initialIndex: tabControllerStorage.tabIndex, + ); return model.isBusy ? LoadingScreen() : Scaffold( @@ -212,6 +231,11 @@ class _GroupScreenState extends State Tab(text: 'Nearby Beacons'), ], controller: tabController, + onTap: (index) { + setState(() { + tabControllerStorage.tabIndex = index; + }); + }, ), Expanded( child: TabBarView( @@ -238,77 +262,116 @@ class _GroupScreenState extends State return Container( alignment: Alignment.center, child: posts.length == 0 - ? SingleChildScrollView( - physics: - AlwaysScrollableScrollPhysics(), - child: Column( - children: [ - Text( - 'You haven\'t joined or created any beacon yet', - textAlign: - TextAlign - .center, - style: TextStyle( - color: - kBlack, - fontSize: - 20), - ), - SizedBox( - height: 2.h, - ), - RichText( - text: TextSpan( - // textAlign: - // TextAlign - // .center, + ? CustomRefreshIndicator( + onRefresh: () async { + reloadUserBeacons(); + }, + builder: + MaterialIndicatorDelegate( + builder: (context, + controller) { + return Icon( + Icons + .location_on, + color: + Colors.blue, + size: 30, + ); + }, + ), + child: + SingleChildScrollView( + physics: + AlwaysScrollableScrollPhysics(), + child: Column( + children: [ + Text( + 'You haven\'t joined or created any beacon yet', + textAlign: + TextAlign + .center, style: TextStyle( color: kBlack, fontSize: 20), - children: [ - TextSpan( - text: - 'Join', - style: TextStyle( - fontWeight: - FontWeight.bold)), - TextSpan( - text: - ' a Hike or '), - TextSpan( - text: - 'Create', - style: TextStyle( - fontWeight: - FontWeight.bold)), - TextSpan( - text: - ' a new one! '), - ], ), - ), - ], + SizedBox( + height: 2.h, + ), + RichText( + text: + TextSpan( + // textAlign: + // TextAlign + // .center, + style: TextStyle( + color: + kBlack, + fontSize: + 20), + children: [ + TextSpan( + text: + 'Join', + style: + TextStyle(fontWeight: FontWeight.bold)), + TextSpan( + text: + ' a Hike or '), + TextSpan( + text: + 'Create', + style: + TextStyle(fontWeight: FontWeight.bold)), + TextSpan( + text: + ' a new one! '), + ], + ), + ), + ], + ), ), ) - : ListView.builder( - physics: - AlwaysScrollableScrollPhysics(), - scrollDirection: - Axis.vertical, - itemCount: - posts?.length, - padding: - EdgeInsets.all(8), - itemBuilder: - (context, index) { - return BeaconCustomWidgets - .getBeaconCard( - context, - posts[ - index]); + : CustomRefreshIndicator( + onRefresh: () async { + reloadUserBeacons(); }, + builder: + MaterialIndicatorDelegate( + builder: (context, + controller) { + return Icon( + Icons + .location_on, + color: + Colors.blue, + size: 30, + ); + }, + ), + child: + ListView.builder( + physics: + AlwaysScrollableScrollPhysics(), + scrollDirection: + Axis.vertical, + itemCount: + posts?.length, + padding: + EdgeInsets.all( + 8), + itemBuilder: + (context, + index) { + return BeaconCustomWidgets + .getBeaconCard( + context, + posts[ + index]); + }, + ), )); } else { return Center( @@ -346,34 +409,69 @@ class _GroupScreenState extends State } final posts = snapshot.data; + if (posts == null || posts.length == 0) { - return SingleChildScrollView( - physics: - AlwaysScrollableScrollPhysics(), - child: Center( - child: Text( - 'No nearby beacons found :(', - style: TextStyle( - color: kBlack, - fontSize: 20), + return CustomRefreshIndicator( + onRefresh: () async { + reloadNearByBeacons(); + }, + builder: + MaterialIndicatorDelegate( + builder: (context, + controller) { + return Icon( + Icons.location_on, + color: Colors.blue, + size: 30, + ); + }, + ), + child: + SingleChildScrollView( + physics: + AlwaysScrollableScrollPhysics(), + child: Center( + child: Text( + 'No nearby beacons found :(', + style: TextStyle( + color: kBlack, + fontSize: 20), + ), ), ), ); } - return ListView.builder( - physics: - AlwaysScrollableScrollPhysics(), - scrollDirection: - Axis.vertical, - itemCount: posts.length, - padding: EdgeInsets.all(8), - itemBuilder: - (context, index) { - return BeaconCustomWidgets - .getBeaconCard(context, - posts[index]); + return CustomRefreshIndicator( + onRefresh: () async { + reloadNearByBeacons(); }, + builder: + MaterialIndicatorDelegate( + builder: + (context, controller) { + return Icon( + Icons.location_on, + color: Colors.blue, + size: 30, + ); + }, + ), + child: ListView.builder( + physics: + AlwaysScrollableScrollPhysics(), + scrollDirection: + Axis.vertical, + itemCount: posts.length, + padding: EdgeInsets.all(8), + itemBuilder: + (context, index) { + return BeaconCustomWidgets + .getBeaconCard( + context, + posts[index]); + }, + ), ); } else { return SingleChildScrollView( @@ -407,3 +505,18 @@ class _GroupScreenState extends State }); } } + +class TabControllerStorage { + static final TabControllerStorage _storage = TabControllerStorage._internal(); + + factory TabControllerStorage() => _storage; + + static int _tabIndex = 0; + + int get tabIndex => _tabIndex; + set tabIndex(int index) { + _tabIndex = index; + } + + TabControllerStorage._internal(); +} diff --git a/pubspec.lock b/pubspec.lock index b5fc2c8a..0cb21efd 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -211,6 +211,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.0.5" + custom_refresh_indicator: + dependency: "direct main" + description: + name: custom_refresh_indicator + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" dart_style: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 4339d91c..716e8720 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -11,6 +11,7 @@ environment: dependencies: connectivity_plus: ^2.2.0 cupertino_icons: ^1.0.2 + custom_refresh_indicator: ^2.0.0 data_connection_checker: ^0.3.4 date_time_picker: ^2.1.0 duration_picker: ^1.1.0+1 From 9a227fb9d12bf1ca7fd08c5f8f44c6da2d6aed80 Mon Sep 17 00:00:00 2001 From: Rushikesh Patade Date: Mon, 7 Nov 2022 01:03:30 +0530 Subject: [PATCH 2/7] fixed the issue --- lib/views/group_screen.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/views/group_screen.dart b/lib/views/group_screen.dart index f5649a44..5b62a19e 100644 --- a/lib/views/group_screen.dart +++ b/lib/views/group_screen.dart @@ -233,7 +233,7 @@ class _GroupScreenState extends State controller: tabController, onTap: (index) { setState(() { - tabControllerStorage.tabIndex = index; + tabControllerStorage.setIndex = index; }); }, ), @@ -514,7 +514,7 @@ class TabControllerStorage { static int _tabIndex = 0; int get tabIndex => _tabIndex; - set tabIndex(int index) { + set setIndex(int index) { _tabIndex = index; } From be54d8d15b7a73b27f7e4cb2e3a1b30eb5b08901 Mon Sep 17 00:00:00 2001 From: Rushikesh Patade Date: Wed, 9 Nov 2022 10:18:01 +0530 Subject: [PATCH 3/7] button redo --- lib/components/hike_button.dart | 2 +- lib/views/home_screen.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/components/hike_button.dart b/lib/components/hike_button.dart index 55d65f03..a87a6423 100644 --- a/lib/components/hike_button.dart +++ b/lib/components/hike_button.dart @@ -27,7 +27,7 @@ class HikeButton extends StatelessWidget { style: ElevatedButton.styleFrom( primary: buttonColor, shape: RoundedRectangleBorder( - borderRadius: new BorderRadius.circular(screensize.width / 20), + borderRadius: new BorderRadius.circular(screensize.width), side: BorderSide( color: borderColor, ), diff --git a/lib/views/home_screen.dart b/lib/views/home_screen.dart index c855ff4d..826eb48d 100644 --- a/lib/views/home_screen.dart +++ b/lib/views/home_screen.dart @@ -177,7 +177,7 @@ class _MainScreenState extends State with TickerProviderStateMixin { Container( width: 45.w, child: HikeButton( - buttonWidth: homebwidth, + buttonWidth: homebwidth - 10, buttonHeight: homebheight - 2, text: 'Join a Group', textColor: kYellow, From e520f615cbfdad2e528ef0284c979e3d34825252 Mon Sep 17 00:00:00 2001 From: Rushikesh Patade <72869428+Rushour0@users.noreply.github.com> Date: Thu, 5 Jan 2023 22:07:50 +0530 Subject: [PATCH 4/7] Add files via upload --- pubspec.lock | 2527 +++++++++++++++++++++++++------------------------- 1 file changed, 1267 insertions(+), 1260 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index 7581b696..c188e567 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,1260 +1,1267 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - _fe_analyzer_shared: - dependency: transitive - description: - name: _fe_analyzer_shared - url: "https://pub.dartlang.org" - source: hosted - version: "40.0.0" - analyzer: - dependency: transitive - description: - name: analyzer - url: "https://pub.dartlang.org" - source: hosted - version: "4.1.0" - archive: - dependency: transitive - description: - name: archive - url: "https://pub.dartlang.org" - source: hosted - version: "3.3.0" - args: - dependency: transitive - description: - name: args - url: "https://pub.dartlang.org" - source: hosted - version: "2.3.1" - async: - dependency: transitive - description: - name: async - url: "https://pub.dartlang.org" - source: hosted - version: "2.9.0" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - build: - dependency: transitive - description: - name: build - url: "https://pub.dartlang.org" - source: hosted - version: "2.3.0" - build_config: - dependency: transitive - description: - name: build_config - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.0" - build_daemon: - dependency: transitive - description: - name: build_daemon - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.0" - build_resolvers: - dependency: transitive - description: - name: build_resolvers - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.9" - build_runner: - dependency: "direct dev" - description: - name: build_runner - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.11" - build_runner_core: - dependency: transitive - description: - name: build_runner_core - url: "https://pub.dartlang.org" - source: hosted - version: "7.2.3" - built_collection: - dependency: transitive - description: - name: built_collection - url: "https://pub.dartlang.org" - source: hosted - version: "5.1.1" - built_value: - dependency: transitive - description: - name: built_value - url: "https://pub.dartlang.org" - source: hosted - version: "8.3.3" - characters: - dependency: transitive - description: - name: characters - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.1" - checked_yaml: - dependency: transitive - description: - name: checked_yaml - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.1" - clock: - dependency: transitive - description: - name: clock - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.1" - code_builder: - dependency: transitive - description: - name: code_builder - url: "https://pub.dartlang.org" - source: hosted - version: "4.1.0" - collection: - dependency: transitive - description: - name: collection - url: "https://pub.dartlang.org" - source: hosted - version: "1.16.0" - connectivity_plus: - dependency: "direct main" - description: - name: connectivity_plus - url: "https://pub.dartlang.org" - source: hosted - version: "2.3.5" - connectivity_plus_linux: - dependency: transitive - description: - name: connectivity_plus_linux - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.1" - connectivity_plus_macos: - dependency: transitive - description: - name: connectivity_plus_macos - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.4" - connectivity_plus_platform_interface: - dependency: transitive - description: - name: connectivity_plus_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.1" - connectivity_plus_web: - dependency: transitive - description: - name: connectivity_plus_web - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.2" - connectivity_plus_windows: - dependency: transitive - description: - name: connectivity_plus_windows - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.2" - convert: - dependency: transitive - description: - name: convert - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.2" - coverage: - dependency: transitive - description: - name: coverage - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.2" - crypto: - dependency: transitive - description: - name: crypto - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.2" - cupertino_icons: - dependency: "direct main" - description: - name: cupertino_icons - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.5" - custom_refresh_indicator: - dependency: "direct main" - description: - name: custom_refresh_indicator - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" - dart_style: - dependency: transitive - description: - name: dart_style - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.3" - data_connection_checker: - dependency: "direct main" - description: - name: data_connection_checker - url: "https://pub.dartlang.org" - source: hosted - version: "0.3.4" - date_time_picker: - dependency: "direct main" - description: - name: date_time_picker - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - dbus: - dependency: transitive - description: - name: dbus - url: "https://pub.dartlang.org" - source: hosted - version: "0.7.5" - duration_picker: - dependency: "direct main" - description: - name: duration_picker - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0+1" - fake_async: - dependency: transitive - description: - name: fake_async - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.1" - ffi: - dependency: transitive - description: - name: ffi - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.1" - file: - dependency: transitive - description: - name: file - url: "https://pub.dartlang.org" - source: hosted - version: "6.1.2" - fixnum: - dependency: transitive - description: - name: fixnum - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.1" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_animarker: - dependency: "direct main" - description: - name: flutter_animarker - url: "https://pub.dartlang.org" - source: hosted - version: "3.2.0" - flutter_config: - dependency: "direct main" - description: - name: flutter_config - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" - flutter_countdown_timer: - dependency: "direct main" - description: - name: flutter_countdown_timer - url: "https://pub.dartlang.org" - source: hosted - version: "4.1.0" - flutter_hooks: - dependency: transitive - description: - name: flutter_hooks - url: "https://pub.dartlang.org" - source: hosted - version: "0.18.5+1" - flutter_launcher_icons: - dependency: "direct dev" - description: - name: flutter_launcher_icons - url: "https://pub.dartlang.org" - source: hosted - version: "0.9.3" - flutter_lints: - dependency: transitive - description: - name: flutter_lints - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.4" - flutter_local_notifications: - dependency: "direct main" - description: - name: flutter_local_notifications - url: "https://pub.dartlang.org" - source: hosted - version: "9.6.1" - flutter_local_notifications_linux: - dependency: transitive - description: - name: flutter_local_notifications_linux - url: "https://pub.dartlang.org" - source: hosted - version: "0.5.0+1" - flutter_local_notifications_platform_interface: - dependency: transitive - description: - name: flutter_local_notifications_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "5.0.0" - flutter_plugin_android_lifecycle: - dependency: transitive - description: - name: flutter_plugin_android_lifecycle - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.6" - flutter_polyline_points: - dependency: "direct main" - description: - name: flutter_polyline_points - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.0" - flutter_spinkit: - dependency: "direct main" - description: - name: flutter_spinkit - url: "https://pub.dartlang.org" - source: hosted - version: "5.1.0" - flutter_test: - dependency: "direct dev" - description: flutter - source: sdk - version: "0.0.0" - flutter_web_plugins: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" - fluttertoast: - dependency: "direct main" - description: - name: fluttertoast - url: "https://pub.dartlang.org" - source: hosted - version: "8.0.9" - frontend_server_client: - dependency: transitive - description: - name: frontend_server_client - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.3" - geocoder: - dependency: "direct main" - description: - path: "." - ref: "443b875d8ec80ce525cc6e8f17dfbbbbe7fa3028" - resolved-ref: "443b875d8ec80ce525cc6e8f17dfbbbbe7fa3028" - url: "https://github.com/nguyenxdat/flutter_geocoder.git" - source: git - version: "0.3.0" - geolocator: - dependency: "direct main" - description: - name: geolocator - url: "https://pub.dartlang.org" - source: hosted - version: "8.2.1" - geolocator_android: - dependency: transitive - description: - name: geolocator_android - url: "https://pub.dartlang.org" - source: hosted - version: "3.2.1" - geolocator_apple: - dependency: transitive - description: - name: geolocator_apple - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.0" - geolocator_platform_interface: - dependency: transitive - description: - name: geolocator_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "4.0.5" - geolocator_web: - dependency: transitive - description: - name: geolocator_web - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.5" - geolocator_windows: - dependency: transitive - description: - name: geolocator_windows - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.1" - get_it: - dependency: "direct main" - description: - name: get_it - url: "https://pub.dartlang.org" - source: hosted - version: "7.2.0" - glob: - dependency: transitive - description: - name: glob - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - google_maps_flutter: - dependency: "direct main" - description: - name: google_maps_flutter - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.8" - google_maps_flutter_platform_interface: - dependency: transitive - description: - name: google_maps_flutter_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.0" - gql: - dependency: transitive - description: - name: gql - url: "https://pub.dartlang.org" - source: hosted - version: "0.13.1" - gql_dedupe_link: - dependency: transitive - description: - name: gql_dedupe_link - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.2" - gql_error_link: - dependency: transitive - description: - name: gql_error_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.2" - gql_exec: - dependency: transitive - description: - name: gql_exec - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.0" - gql_http_link: - dependency: transitive - description: - name: gql_http_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.2" - gql_link: - dependency: transitive - description: - name: gql_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.2" - gql_transform_link: - dependency: transitive - description: - name: gql_transform_link - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.2" - graphql: - dependency: transitive - description: - name: graphql - url: "https://pub.dartlang.org" - source: hosted - version: "5.1.1" - graphql_flutter: - dependency: "direct main" - description: - name: graphql_flutter - url: "https://pub.dartlang.org" - source: hosted - version: "5.1.0" - graphs: - dependency: transitive - description: - name: graphs - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - hive: - dependency: "direct main" - description: - name: hive - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.2" - hive_generator: - dependency: "direct dev" - description: - name: hive_generator - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.3" - http: - dependency: transitive - description: - name: http - url: "https://pub.dartlang.org" - source: hosted - version: "0.13.4" - http_multi_server: - dependency: transitive - description: - name: http_multi_server - url: "https://pub.dartlang.org" - source: hosted - version: "3.2.1" - http_parser: - dependency: transitive - description: - name: http_parser - url: "https://pub.dartlang.org" - source: hosted - version: "4.0.1" - image: - dependency: transitive - description: - name: image - url: "https://pub.dartlang.org" - source: hosted - version: "3.2.0" - intl: - dependency: "direct main" - description: - name: intl - url: "https://pub.dartlang.org" - source: hosted - version: "0.17.0" - io: - dependency: transitive - description: - name: io - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.3" - js: - dependency: transitive - description: - name: js - url: "https://pub.dartlang.org" - source: hosted - version: "0.6.4" - json_annotation: - dependency: transitive - description: - name: json_annotation - url: "https://pub.dartlang.org" - source: hosted - version: "4.5.0" - lints: - dependency: transitive - description: - name: lints - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.1" - location: - dependency: "direct main" - description: - name: location - url: "https://pub.dartlang.org" - source: hosted - version: "4.4.0" - location_platform_interface: - dependency: transitive - description: - name: location_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.3.0" - location_web: - dependency: transitive - description: - name: location_web - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.1" - logging: - dependency: transitive - description: - name: logging - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.2" - matcher: - dependency: transitive - description: - name: matcher - url: "https://pub.dartlang.org" - source: hosted - version: "0.12.12" - material_color_utilities: - dependency: transitive - description: - name: material_color_utilities - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.5" - meta: - dependency: transitive - description: - name: meta - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.0" - mime: - dependency: transitive - description: - name: mime - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.2" - modal_progress_hud: - dependency: "direct main" - description: - name: modal_progress_hud - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.3" - nested: - dependency: transitive - description: - name: nested - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.0" - nm: - dependency: transitive - description: - name: nm - url: "https://pub.dartlang.org" - source: hosted - version: "0.5.0" - node_preamble: - dependency: transitive - description: - name: node_preamble - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.1" - normalize: - dependency: transitive - description: - name: normalize - url: "https://pub.dartlang.org" - source: hosted - version: "0.6.0+1" - overlay_support: - dependency: "direct main" - description: - name: overlay_support - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.1" - package_config: - dependency: transitive - description: - name: package_config - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - path: - dependency: transitive - description: - name: path - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.2" - path_provider: - dependency: "direct main" - description: - name: path_provider - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.11" - path_provider_android: - dependency: transitive - description: - name: path_provider_android - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.15" - path_provider_ios: - dependency: transitive - description: - name: path_provider_ios - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.10" - path_provider_linux: - dependency: transitive - description: - name: path_provider_linux - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.7" - path_provider_macos: - dependency: transitive - description: - name: path_provider_macos - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.6" - path_provider_platform_interface: - dependency: transitive - description: - name: path_provider_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.4" - path_provider_windows: - dependency: transitive - description: - name: path_provider_windows - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - petitparser: - dependency: transitive - description: - name: petitparser - url: "https://pub.dartlang.org" - source: hosted - version: "5.0.0" - platform: - dependency: transitive - description: - name: platform - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.0" - plugin_platform_interface: - dependency: transitive - description: - name: plugin_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.2" - pool: - dependency: transitive - description: - name: pool - url: "https://pub.dartlang.org" - source: hosted - version: "1.5.1" - process: - dependency: transitive - description: - name: process - url: "https://pub.dartlang.org" - source: hosted - version: "4.2.4" - provider: - dependency: "direct main" - description: - name: provider - url: "https://pub.dartlang.org" - source: hosted - version: "6.0.3" - pub_semver: - dependency: transitive - description: - name: pub_semver - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.1" - pubspec_parse: - dependency: transitive - description: - name: pubspec_parse - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - rxdart: - dependency: "direct main" - description: - name: rxdart - url: "https://pub.dartlang.org" - source: hosted - version: "0.27.4" - share_plus: - dependency: "direct main" - description: - name: share_plus - url: "https://pub.dartlang.org" - source: hosted - version: "4.0.9" - share_plus_linux: - dependency: transitive - description: - name: share_plus_linux - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.0" - share_plus_macos: - dependency: transitive - description: - name: share_plus_macos - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.1" - share_plus_platform_interface: - dependency: transitive - description: - name: share_plus_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.3" - share_plus_web: - dependency: transitive - description: - name: share_plus_web - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.1" - share_plus_windows: - dependency: transitive - description: - name: share_plus_windows - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.1" - shared_preferences: - dependency: "direct main" - description: - name: shared_preferences - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.15" - shared_preferences_android: - dependency: transitive - description: - name: shared_preferences_android - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.12" - shared_preferences_ios: - dependency: transitive - description: - name: shared_preferences_ios - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.1" - shared_preferences_linux: - dependency: transitive - description: - name: shared_preferences_linux - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.1" - shared_preferences_macos: - dependency: transitive - description: - name: shared_preferences_macos - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.4" - shared_preferences_platform_interface: - dependency: transitive - description: - name: shared_preferences_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" - shared_preferences_web: - dependency: transitive - description: - name: shared_preferences_web - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.4" - shared_preferences_windows: - dependency: transitive - description: - name: shared_preferences_windows - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.1" - shelf: - dependency: transitive - description: - name: shelf - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.1" - shelf_packages_handler: - dependency: transitive - description: - name: shelf_packages_handler - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.1" - shelf_static: - dependency: transitive - description: - name: shelf_static - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.1" - shelf_web_socket: - dependency: transitive - description: - name: shelf_web_socket - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.2" - sizer: - dependency: "direct main" - description: - name: sizer - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.15" - skeleton_text: - dependency: "direct main" - description: - name: skeleton_text - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.0" - sky_engine: - dependency: transitive - description: flutter - source: sdk - version: "0.0.99" - sliding_up_panel: - dependency: "direct main" - description: - name: sliding_up_panel - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0+1" - source_gen: - dependency: transitive - description: - name: source_gen - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.2" - source_helper: - dependency: transitive - description: - name: source_helper - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.2" - source_map_stack_trace: - dependency: transitive - description: - name: source_map_stack_trace - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - source_maps: - dependency: transitive - description: - name: source_maps - url: "https://pub.dartlang.org" - source: hosted - version: "0.10.10" - source_span: - dependency: transitive - description: - name: source_span - url: "https://pub.dartlang.org" - source: hosted - version: "1.9.0" - stack_trace: - dependency: transitive - description: - name: stack_trace - url: "https://pub.dartlang.org" - source: hosted - version: "1.10.0" - stream_channel: - dependency: transitive - description: - name: stream_channel - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - stream_transform: - dependency: transitive - description: - name: stream_transform - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" - string_scanner: - dependency: transitive - description: - name: string_scanner - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.1" - term_glyph: - dependency: transitive - description: - name: term_glyph - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.1" - test: - dependency: "direct dev" - description: - name: test - url: "https://pub.dartlang.org" - source: hosted - version: "1.21.4" - test_api: - dependency: transitive - description: - name: test_api - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.12" - test_core: - dependency: transitive - description: - name: test_core - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.16" - timezone: - dependency: transitive - description: - name: timezone - url: "https://pub.dartlang.org" - source: hosted - version: "0.8.0" - timing: - dependency: transitive - description: - name: timing - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.0" - typed_data: - dependency: transitive - description: - name: typed_data - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.1" - uni_links: - dependency: "direct main" - description: - name: uni_links - url: "https://pub.dartlang.org" - source: hosted - version: "0.5.1" - uni_links_platform_interface: - dependency: transitive - description: - name: uni_links_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.0" - uni_links_web: - dependency: transitive - description: - name: uni_links_web - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.0" - universal_io: - dependency: transitive - description: - name: universal_io - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.4" - url_launcher: - dependency: transitive - description: - name: url_launcher - url: "https://pub.dartlang.org" - source: hosted - version: "6.1.4" - url_launcher_android: - dependency: transitive - description: - name: url_launcher_android - url: "https://pub.dartlang.org" - source: hosted - version: "6.0.17" - url_launcher_ios: - dependency: transitive - description: - name: url_launcher_ios - url: "https://pub.dartlang.org" - source: hosted - version: "6.0.17" - url_launcher_linux: - dependency: transitive - description: - name: url_launcher_linux - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.1" - url_launcher_macos: - dependency: transitive - description: - name: url_launcher_macos - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.1" - url_launcher_platform_interface: - dependency: transitive - description: - name: url_launcher_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - url_launcher_web: - dependency: transitive - description: - name: url_launcher_web - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.12" - url_launcher_windows: - dependency: transitive - description: - name: url_launcher_windows - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.1" - uuid: - dependency: transitive - description: - name: uuid - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.6" - vector_math: - dependency: transitive - description: - name: vector_math - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.2" - vm_service: - dependency: transitive - description: - name: vm_service - url: "https://pub.dartlang.org" - source: hosted - version: "8.3.0" - watcher: - dependency: transitive - description: - name: watcher - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.1" - web_socket_channel: - dependency: transitive - description: - name: web_socket_channel - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.0" - webkit_inspection_protocol: - dependency: transitive - description: - name: webkit_inspection_protocol - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - win32: - dependency: transitive - description: - name: win32 - url: "https://pub.dartlang.org" - source: hosted - version: "2.7.0" - xdg_directories: - dependency: transitive - description: - name: xdg_directories - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0+1" - xml: - dependency: transitive - description: - name: xml - url: "https://pub.dartlang.org" - source: hosted - version: "6.1.0" - yaml: - dependency: transitive - description: - name: yaml - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.1" -sdks: - dart: ">=2.17.0 <3.0.0" - flutter: ">=3.0.0" +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + url: "https://pub.dartlang.org" + source: hosted + version: "40.0.0" + analyzer: + dependency: transitive + description: + name: analyzer + url: "https://pub.dartlang.org" + source: hosted + version: "4.1.0" + archive: + dependency: transitive + description: + name: archive + url: "https://pub.dartlang.org" + source: hosted + version: "3.3.0" + args: + dependency: transitive + description: + name: args + url: "https://pub.dartlang.org" + source: hosted + version: "2.3.1" + async: + dependency: transitive + description: + name: async + url: "https://pub.dartlang.org" + source: hosted + version: "2.8.2" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + build: + dependency: transitive + description: + name: build + url: "https://pub.dartlang.org" + source: hosted + version: "2.3.0" + build_config: + dependency: transitive + description: + name: build_config + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.0" + build_daemon: + dependency: transitive + description: + name: build_daemon + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.0" + build_resolvers: + dependency: transitive + description: + name: build_resolvers + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.9" + build_runner: + dependency: "direct dev" + description: + name: build_runner + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.11" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + url: "https://pub.dartlang.org" + source: hosted + version: "7.2.3" + built_collection: + dependency: transitive + description: + name: built_collection + url: "https://pub.dartlang.org" + source: hosted + version: "5.1.1" + built_value: + dependency: transitive + description: + name: built_value + url: "https://pub.dartlang.org" + source: hosted + version: "8.3.3" + characters: + dependency: transitive + description: + name: characters + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0" + charcode: + dependency: transitive + description: + name: charcode + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.1" + checked_yaml: + dependency: transitive + description: + name: checked_yaml + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.1" + clock: + dependency: transitive + description: + name: clock + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" + code_builder: + dependency: transitive + description: + name: code_builder + url: "https://pub.dartlang.org" + source: hosted + version: "4.1.0" + collection: + dependency: transitive + description: + name: collection + url: "https://pub.dartlang.org" + source: hosted + version: "1.16.0" + connectivity_plus: + dependency: "direct main" + description: + name: connectivity_plus + url: "https://pub.dartlang.org" + source: hosted + version: "2.3.5" + connectivity_plus_linux: + dependency: transitive + description: + name: connectivity_plus_linux + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.1" + connectivity_plus_macos: + dependency: transitive + description: + name: connectivity_plus_macos + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.4" + connectivity_plus_platform_interface: + dependency: transitive + description: + name: connectivity_plus_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.1" + connectivity_plus_web: + dependency: transitive + description: + name: connectivity_plus_web + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.2" + connectivity_plus_windows: + dependency: transitive + description: + name: connectivity_plus_windows + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.2" + convert: + dependency: transitive + description: + name: convert + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.2" + coverage: + dependency: transitive + description: + name: coverage + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.2" + crypto: + dependency: transitive + description: + name: crypto + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.2" + cupertino_icons: + dependency: "direct main" + description: + name: cupertino_icons + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.5" + custom_refresh_indicator: + dependency: "direct main" + description: + name: custom_refresh_indicator + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" + dart_style: + dependency: transitive + description: + name: dart_style + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.3" + data_connection_checker: + dependency: "direct main" + description: + name: data_connection_checker + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.4" + date_time_picker: + dependency: "direct main" + description: + name: date_time_picker + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + dbus: + dependency: transitive + description: + name: dbus + url: "https://pub.dartlang.org" + source: hosted + version: "0.7.5" + duration_picker: + dependency: "direct main" + description: + name: duration_picker + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0+1" + fake_async: + dependency: transitive + description: + name: fake_async + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.0" + ffi: + dependency: transitive + description: + name: ffi + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.1" + file: + dependency: transitive + description: + name: file + url: "https://pub.dartlang.org" + source: hosted + version: "6.1.2" + fixnum: + dependency: transitive + description: + name: fixnum + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_animarker: + dependency: "direct main" + description: + name: flutter_animarker + url: "https://pub.dartlang.org" + source: hosted + version: "3.2.0" + flutter_config: + dependency: "direct main" + description: + name: flutter_config + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" + flutter_countdown_timer: + dependency: "direct main" + description: + name: flutter_countdown_timer + url: "https://pub.dartlang.org" + source: hosted + version: "4.1.0" + flutter_hooks: + dependency: transitive + description: + name: flutter_hooks + url: "https://pub.dartlang.org" + source: hosted + version: "0.18.5+1" + flutter_launcher_icons: + dependency: "direct dev" + description: + name: flutter_launcher_icons + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.3" + flutter_lints: + dependency: transitive + description: + name: flutter_lints + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + flutter_local_notifications: + dependency: "direct main" + description: + name: flutter_local_notifications + url: "https://pub.dartlang.org" + source: hosted + version: "9.6.1" + flutter_local_notifications_linux: + dependency: transitive + description: + name: flutter_local_notifications_linux + url: "https://pub.dartlang.org" + source: hosted + version: "0.5.0+1" + flutter_local_notifications_platform_interface: + dependency: transitive + description: + name: flutter_local_notifications_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "5.0.0" + flutter_plugin_android_lifecycle: + dependency: transitive + description: + name: flutter_plugin_android_lifecycle + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.6" + flutter_polyline_points: + dependency: "direct main" + description: + name: flutter_polyline_points + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.0" + flutter_spinkit: + dependency: "direct main" + description: + name: flutter_spinkit + url: "https://pub.dartlang.org" + source: hosted + version: "5.1.0" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + fluttertoast: + dependency: "direct main" + description: + name: fluttertoast + url: "https://pub.dartlang.org" + source: hosted + version: "8.0.9" + frontend_server_client: + dependency: transitive + description: + name: frontend_server_client + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.3" + geocoder: + dependency: "direct main" + description: + path: "." + ref: "443b875d8ec80ce525cc6e8f17dfbbbbe7fa3028" + resolved-ref: "443b875d8ec80ce525cc6e8f17dfbbbbe7fa3028" + url: "https://github.com/nguyenxdat/flutter_geocoder.git" + source: git + version: "0.3.0" + geolocator: + dependency: "direct main" + description: + name: geolocator + url: "https://pub.dartlang.org" + source: hosted + version: "8.2.1" + geolocator_android: + dependency: transitive + description: + name: geolocator_android + url: "https://pub.dartlang.org" + source: hosted + version: "3.2.1" + geolocator_apple: + dependency: transitive + description: + name: geolocator_apple + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.0" + geolocator_platform_interface: + dependency: transitive + description: + name: geolocator_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "4.0.5" + geolocator_web: + dependency: transitive + description: + name: geolocator_web + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.5" + geolocator_windows: + dependency: transitive + description: + name: geolocator_windows + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.1" + get_it: + dependency: "direct main" + description: + name: get_it + url: "https://pub.dartlang.org" + source: hosted + version: "7.2.0" + glob: + dependency: transitive + description: + name: glob + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + google_maps_flutter: + dependency: "direct main" + description: + name: google_maps_flutter + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.8" + google_maps_flutter_platform_interface: + dependency: transitive + description: + name: google_maps_flutter_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.0" + gql: + dependency: transitive + description: + name: gql + url: "https://pub.dartlang.org" + source: hosted + version: "0.13.1" + gql_dedupe_link: + dependency: transitive + description: + name: gql_dedupe_link + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.2" + gql_error_link: + dependency: transitive + description: + name: gql_error_link + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.2" + gql_exec: + dependency: transitive + description: + name: gql_exec + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.0" + gql_http_link: + dependency: transitive + description: + name: gql_http_link + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.2" + gql_link: + dependency: transitive + description: + name: gql_link + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.2" + gql_transform_link: + dependency: transitive + description: + name: gql_transform_link + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.2" + graphql: + dependency: transitive + description: + name: graphql + url: "https://pub.dartlang.org" + source: hosted + version: "5.1.1" + graphql_flutter: + dependency: "direct main" + description: + name: graphql_flutter + url: "https://pub.dartlang.org" + source: hosted + version: "5.1.0" + graphs: + dependency: transitive + description: + name: graphs + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + hive: + dependency: "direct main" + description: + name: hive + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.2" + hive_generator: + dependency: "direct dev" + description: + name: hive_generator + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.3" + http: + dependency: transitive + description: + name: http + url: "https://pub.dartlang.org" + source: hosted + version: "0.13.4" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + url: "https://pub.dartlang.org" + source: hosted + version: "3.2.1" + http_parser: + dependency: transitive + description: + name: http_parser + url: "https://pub.dartlang.org" + source: hosted + version: "4.0.1" + image: + dependency: transitive + description: + name: image + url: "https://pub.dartlang.org" + source: hosted + version: "3.2.0" + intl: + dependency: "direct main" + description: + name: intl + url: "https://pub.dartlang.org" + source: hosted + version: "0.17.0" + io: + dependency: transitive + description: + name: io + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.3" + js: + dependency: transitive + description: + name: js + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.4" + json_annotation: + dependency: transitive + description: + name: json_annotation + url: "https://pub.dartlang.org" + source: hosted + version: "4.5.0" + lints: + dependency: transitive + description: + name: lints + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" + location: + dependency: "direct main" + description: + name: location + url: "https://pub.dartlang.org" + source: hosted + version: "4.4.0" + location_platform_interface: + dependency: transitive + description: + name: location_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "2.3.0" + location_web: + dependency: transitive + description: + name: location_web + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.1" + logging: + dependency: transitive + description: + name: logging + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.2" + matcher: + dependency: transitive + description: + name: matcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.11" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.4" + meta: + dependency: transitive + description: + name: meta + url: "https://pub.dartlang.org" + source: hosted + version: "1.7.0" + mime: + dependency: transitive + description: + name: mime + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.2" + modal_progress_hud: + dependency: "direct main" + description: + name: modal_progress_hud + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.3" + nested: + dependency: transitive + description: + name: nested + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.0" + nm: + dependency: transitive + description: + name: nm + url: "https://pub.dartlang.org" + source: hosted + version: "0.5.0" + node_preamble: + dependency: transitive + description: + name: node_preamble + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.1" + normalize: + dependency: transitive + description: + name: normalize + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.0+1" + overlay_support: + dependency: "direct main" + description: + name: overlay_support + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.1" + package_config: + dependency: transitive + description: + name: package_config + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + path: + dependency: transitive + description: + name: path + url: "https://pub.dartlang.org" + source: hosted + version: "1.8.1" + path_provider: + dependency: "direct main" + description: + name: path_provider + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.11" + path_provider_android: + dependency: transitive + description: + name: path_provider_android + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.15" + path_provider_ios: + dependency: transitive + description: + name: path_provider_ios + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.10" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.7" + path_provider_macos: + dependency: transitive + description: + name: path_provider_macos + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.6" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.4" + path_provider_windows: + dependency: transitive + description: + name: path_provider_windows + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + petitparser: + dependency: transitive + description: + name: petitparser + url: "https://pub.dartlang.org" + source: hosted + version: "5.0.0" + platform: + dependency: transitive + description: + name: platform + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.0" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.2" + pool: + dependency: transitive + description: + name: pool + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.1" + process: + dependency: transitive + description: + name: process + url: "https://pub.dartlang.org" + source: hosted + version: "4.2.4" + provider: + dependency: "direct main" + description: + name: provider + url: "https://pub.dartlang.org" + source: hosted + version: "6.0.3" + pub_semver: + dependency: transitive + description: + name: pub_semver + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0" + rxdart: + dependency: "direct main" + description: + name: rxdart + url: "https://pub.dartlang.org" + source: hosted + version: "0.27.4" + share_plus: + dependency: "direct main" + description: + name: share_plus + url: "https://pub.dartlang.org" + source: hosted + version: "4.0.9" + share_plus_linux: + dependency: transitive + description: + name: share_plus_linux + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.0" + share_plus_macos: + dependency: transitive + description: + name: share_plus_macos + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.1" + share_plus_platform_interface: + dependency: transitive + description: + name: share_plus_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.3" + share_plus_web: + dependency: transitive + description: + name: share_plus_web + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.1" + share_plus_windows: + dependency: transitive + description: + name: share_plus_windows + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.1" + shared_preferences: + dependency: "direct main" + description: + name: shared_preferences + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.15" + shared_preferences_android: + dependency: transitive + description: + name: shared_preferences_android + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.12" + shared_preferences_ios: + dependency: transitive + description: + name: shared_preferences_ios + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + shared_preferences_linux: + dependency: transitive + description: + name: shared_preferences_linux + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + shared_preferences_macos: + dependency: transitive + description: + name: shared_preferences_macos + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.4" + shared_preferences_platform_interface: + dependency: transitive + description: + name: shared_preferences_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" + shared_preferences_web: + dependency: transitive + description: + name: shared_preferences_web + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.4" + shared_preferences_windows: + dependency: transitive + description: + name: shared_preferences_windows + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + shelf: + dependency: transitive + description: + name: shelf + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.1" + shelf_packages_handler: + dependency: transitive + description: + name: shelf_packages_handler + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.1" + shelf_static: + dependency: transitive + description: + name: shelf_static + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.1" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.2" + sizer: + dependency: "direct main" + description: + name: sizer + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.15" + skeleton_text: + dependency: "direct main" + description: + name: skeleton_text + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.0" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" + sliding_up_panel: + dependency: "direct main" + description: + name: sliding_up_panel + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0+1" + source_gen: + dependency: transitive + description: + name: source_gen + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.2" + source_helper: + dependency: transitive + description: + name: source_helper + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.2" + source_map_stack_trace: + dependency: transitive + description: + name: source_map_stack_trace + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + source_maps: + dependency: transitive + description: + name: source_maps + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.10" + source_span: + dependency: transitive + description: + name: source_span + url: "https://pub.dartlang.org" + source: hosted + version: "1.8.2" + stack_trace: + dependency: transitive + description: + name: stack_trace + url: "https://pub.dartlang.org" + source: hosted + version: "1.10.0" + stream_channel: + dependency: transitive + description: + name: stream_channel + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + stream_transform: + dependency: transitive + description: + name: stream_transform + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" + string_scanner: + dependency: transitive + description: + name: string_scanner + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" + term_glyph: + dependency: transitive + description: + name: term_glyph + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0" + test: + dependency: "direct dev" + description: + name: test + url: "https://pub.dartlang.org" + source: hosted + version: "1.21.1" + test_api: + dependency: transitive + description: + name: test_api + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.9" + test_core: + dependency: transitive + description: + name: test_core + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.13" + timezone: + dependency: transitive + description: + name: timezone + url: "https://pub.dartlang.org" + source: hosted + version: "0.8.0" + timing: + dependency: transitive + description: + name: timing + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.0" + typed_data: + dependency: transitive + description: + name: typed_data + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.1" + uni_links: + dependency: "direct main" + description: + name: uni_links + url: "https://pub.dartlang.org" + source: hosted + version: "0.5.1" + uni_links_platform_interface: + dependency: transitive + description: + name: uni_links_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.0" + uni_links_web: + dependency: transitive + description: + name: uni_links_web + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.0" + universal_io: + dependency: transitive + description: + name: universal_io + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.4" + url_launcher: + dependency: transitive + description: + name: url_launcher + url: "https://pub.dartlang.org" + source: hosted + version: "6.1.4" + url_launcher_android: + dependency: transitive + description: + name: url_launcher_android + url: "https://pub.dartlang.org" + source: hosted + version: "6.0.17" + url_launcher_ios: + dependency: transitive + description: + name: url_launcher_ios + url: "https://pub.dartlang.org" + source: hosted + version: "6.0.17" + url_launcher_linux: + dependency: transitive + description: + name: url_launcher_linux + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.1" + url_launcher_macos: + dependency: transitive + description: + name: url_launcher_macos + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.1" + url_launcher_platform_interface: + dependency: transitive + description: + name: url_launcher_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + url_launcher_web: + dependency: transitive + description: + name: url_launcher_web + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.12" + url_launcher_windows: + dependency: transitive + description: + name: url_launcher_windows + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.1" + uuid: + dependency: transitive + description: + name: uuid + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.6" + vector_math: + dependency: transitive + description: + name: vector_math + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.2" + vm_service: + dependency: transitive + description: + name: vm_service + url: "https://pub.dartlang.org" + source: hosted + version: "8.3.0" + watcher: + dependency: transitive + description: + name: watcher + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.0" + webkit_inspection_protocol: + dependency: transitive + description: + name: webkit_inspection_protocol + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" + win32: + dependency: transitive + description: + name: win32 + url: "https://pub.dartlang.org" + source: hosted + version: "2.7.0" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.0+1" + xml: + dependency: transitive + description: + name: xml + url: "https://pub.dartlang.org" + source: hosted + version: "6.1.0" + yaml: + dependency: transitive + description: + name: yaml + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.1" +sdks: + dart: ">=2.17.0 <3.0.0" + flutter: ">=3.0.0" From 62a722806b84544f251c16d1d2da1ad00bb1d6e9 Mon Sep 17 00:00:00 2001 From: Rushikesh Patade <72869428+Rushour0@users.noreply.github.com> Date: Thu, 5 Jan 2023 22:11:09 +0530 Subject: [PATCH 5/7] elevation changed + better reload icon code --- lib/views/auth_screen.dart | 934 ++++++++++++++++---------------- lib/views/group_screen.dart | 1001 +++++++++++++++++------------------ 2 files changed, 946 insertions(+), 989 deletions(-) diff --git a/lib/views/auth_screen.dart b/lib/views/auth_screen.dart index 7eb0ca23..622d8df5 100644 --- a/lib/views/auth_screen.dart +++ b/lib/views/auth_screen.dart @@ -1,467 +1,467 @@ -import 'package:beacon/components/hike_button.dart'; -import 'package:beacon/components/shape_painter.dart'; -import 'package:beacon/services/validators.dart'; -import 'package:beacon/utilities/constants.dart'; -import 'package:beacon/utilities/indication_painter.dart'; -import 'package:beacon/view_model/auth_screen_model.dart'; -import 'package:beacon/views/base_view.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:sizer/sizer.dart'; - -import '../components/loading_screen.dart'; - -class AuthScreen extends StatefulWidget { - const AuthScreen({Key key}) : super(key: key); - - @override - _AuthScreenState createState() => _AuthScreenState(); -} - -class _AuthScreenState extends State - with SingleTickerProviderStateMixin { - Future _onPopHome() async { - return showDialog( - context: context, - builder: (context) => AlertDialog( - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(10.0), - ), - actionsAlignment: MainAxisAlignment.spaceEvenly, - contentPadding: EdgeInsets.all(25.0), - title: Text( - 'Confirm Exit', - style: TextStyle(fontSize: 25, color: kYellow), - ), - content: Text( - 'Do you really want to exit?', - style: TextStyle(fontSize: 18, color: kBlack), - ), - actions: [ - HikeButton( - buttonHeight: 2.5.h, - buttonWidth: 8.w, - onTap: () => Navigator.of(context).pop(false), - text: 'No', - ), - HikeButton( - buttonHeight: 2.5.h, - buttonWidth: 8.w, - onTap: () => - SystemChannels.platform.invokeMethod('SystemNavigator.pop'), - text: 'Yes', - ), - ], - ), - ); - } - - @override - Widget build(BuildContext context) { - Size screensize = MediaQuery.of(context).size; - return WillPopScope( - onWillPop: _onPopHome, - child: BaseView( - builder: (context, model, child) { - return (model.isBusy) - ? LoadingScreen() - : new Scaffold( - key: model.scaffoldKey, - resizeToAvoidBottomInset: true, - body: Container( - width: screensize.width, - height: - screensize.height >= 775.0 ? screensize.height : 775.0, - child: Stack( - children: [ - CustomPaint( - size: Size(screensize.width, screensize.height), - painter: ShapePainter(), - ), - Container( - alignment: Alignment.center, - padding: - EdgeInsets.only(top: screensize.height / 3.5), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Padding( - padding: EdgeInsets.only(top: 20.0), - child: _buildMenuBar(context, model), - ), - Expanded( - flex: 2, - child: PageView( - controller: model.pageController, - onPageChanged: (i) { - if (i == 0) { - setState(() { - model.right = Colors.black; - model.left = Colors.white; - }); - Future.delayed( - Duration(milliseconds: 500), () { - model.requestFocusForFocusNode( - model.emailLogin); - }); - } else if (i == 1) { - setState(() { - model.right = Colors.white; - model.left = Colors.black; - }); - Future.delayed( - Duration(milliseconds: 500), () { - model.requestFocusForFocusNode( - model.name); - }); - } - }, - children: [ - new ConstrainedBox( - constraints: - const BoxConstraints.expand(), - child: _buildSignIn(context, model), - ), - new ConstrainedBox( - constraints: - const BoxConstraints.expand(), - child: _buildSignUp(context, model), - ), - ], - ), - ), - ], - ), - ), - ], - ), - ), - ); - }, - ), - ); - } - - Widget _buildMenuBar(BuildContext context, AuthViewModel model) { - Size screensize = MediaQuery.of(context).size; - return Container( - padding: EdgeInsets.symmetric(horizontal: 13.5.w), - width: screensize.width, - height: screensize.height < 800 ? 7.5.h : 6.h, - decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(25.0)), - ), - child: CustomPaint( - painter: TabIndicationPainter(pageController: model.pageController), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - Expanded( - child: TextButton( - style: ButtonStyle( - overlayColor: MaterialStateProperty.all(Colors.transparent), - ), - //highlightColor: Colors.white, - onPressed: model.onSignInButtonPress, - child: Text( - "Existing", - style: TextStyle( - color: model.left, - fontSize: 18.0, - ), - ), - ), - ), - Expanded( - child: TextButton( - style: ButtonStyle( - overlayColor: MaterialStateProperty.all(Colors.transparent), - ), - onPressed: model.onSignUpButtonPress, - child: Text( - "New", - style: TextStyle( - color: model.right, - fontSize: 18.0, - ), - ), - ), - ), - ], - ), - ), - ); - } - - Widget _buildSignIn(BuildContext context, AuthViewModel model) { - Size screensize = MediaQuery.of(context).size; - return SingleChildScrollView( - child: Container( - padding: EdgeInsets.only(top: 3.h, left: 8.5.w, right: 8.5.w), - width: screensize.width, - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Form( - key: model.formKeyLogin, - autovalidateMode: model.loginValidate, - child: Wrap( - children: [ - Card( - elevation: 5.0, - color: Colors.white, - shape: RoundedRectangleBorder( - borderRadius: - BorderRadius.circular(screensize.width / 20), - ), - child: Container( - // height: 13.h, - padding: EdgeInsets.symmetric( - horizontal: 10, - vertical: 10, - ), - child: TextFormField( - autovalidateMode: model.loginValidate, - focusNode: model.emailLogin, - controller: model.loginEmailController, - validator: (value) => - Validator.validateEmail(value.trimRight()), - keyboardType: TextInputType.emailAddress, - style: TextStyle(fontSize: 16.0, color: Colors.black), - decoration: InputDecoration( - border: InputBorder.none, - icon: Icon( - Icons.mail_outline, - color: Colors.black, - size: 24.0, - ), - hintText: "Email Address", - hintStyle: TextStyle( - fontSize: hintsize - 2, color: hintColor), - ), - ), - ), - ), - Card( - elevation: 5.0, - color: Colors.white, - shape: RoundedRectangleBorder( - borderRadius: - BorderRadius.circular(screensize.width / 20), - ), - child: Container( - padding: - EdgeInsets.symmetric(horizontal: 10, vertical: 10.0), - child: TextFormField( - autovalidateMode: model.loginValidate, - focusNode: model.passwordLogin, - controller: model.loginPasswordController, - obscureText: model.obscureTextLogin, - validator: (value) => Validator.validatePassword(value), - style: TextStyle(fontSize: 16.0, color: Colors.black), - decoration: InputDecoration( - border: InputBorder.none, - icon: Icon( - Icons.lock, - size: 24.0, - color: Colors.black, - ), - hintText: "Password", - hintStyle: TextStyle( - fontSize: hintsize - 2, color: hintColor), - suffixIcon: IconButton( - onPressed: () => model.displayPasswordLogin(), - icon: Icon( - model.obscureTextLogin - ? Icons.visibility - : Icons.visibility_off, - size: 20.0, - color: Colors.black, - ), - ), - ), - ), - ), - ), - ], - ), - ), - SizedBox( - height: 3.5.h, - ), - HikeButton( - onTap: model.nextLogin, - text: 'LOGIN', - ), - Padding( - padding: EdgeInsets.only( - left: 15.0, right: 15.0, top: 15.0, bottom: 15.0), - child: Text( - "OR", - style: TextStyle( - color: Colors.black, - fontSize: 16.0, - ), - ), - ), - HikeButton( - onTap: () => model.loginAsGuest(), - text: 'LOGIN AS GUEST', - ), - ], - ), - ), - ); - } - - Widget _buildSignUp(BuildContext context, AuthViewModel model) { - Size screensize = MediaQuery.of(context).size; - return SingleChildScrollView( - child: Container( - padding: EdgeInsets.only(top: 3.h, left: 8.5.w, right: 8.5.w), - child: Column( - children: [ - Form( - key: model.formKeySignup, - autovalidateMode: model.signupValidate, - child: Container( - width: screensize.width - 70, - // height: 280.0, - child: Column(children: [ - Card( - elevation: 5, - color: Colors.white, - shape: RoundedRectangleBorder( - borderRadius: - BorderRadius.circular(screensize.width / 20), - ), - child: Container( - padding: EdgeInsets.symmetric( - horizontal: 10, vertical: 10.0), - child: TextFormField( - autovalidateMode: model.signupValidate, - validator: (value) => Validator.validateName(value), - focusNode: model.name, - textInputAction: TextInputAction.next, - controller: model.signupNameController, - keyboardType: TextInputType.text, - textCapitalization: TextCapitalization.words, - style: TextStyle(fontSize: 18.0, color: Colors.black), - decoration: InputDecoration( - border: InputBorder.none, - icon: Icon( - Icons.account_box, - color: Colors.black, - size: 24, - ), - hintText: "Name", - hintStyle: TextStyle( - fontSize: hintsize - 2, color: hintColor), - ), - ), - ), - ), - Card( - elevation: 5, - color: Colors.white, - shape: RoundedRectangleBorder( - borderRadius: - BorderRadius.circular(screensize.width / 20), - ), - child: Container( - padding: EdgeInsets.symmetric( - horizontal: 10, vertical: 10.0), - child: TextFormField( - autovalidateMode: model.signupValidate, - validator: (value) => Validator.validateEmail(value), - focusNode: model.email, - textInputAction: TextInputAction.next, - controller: model.signupEmailController, - keyboardType: TextInputType.emailAddress, - style: TextStyle(fontSize: 16.0, color: Colors.black), - decoration: InputDecoration( - border: InputBorder.none, - icon: Icon( - Icons.mail, - color: Colors.black, - size: 24, - ), - hintText: "Email Address", - hintStyle: TextStyle( - fontSize: hintsize - 2, color: hintColor), - ), - ), - ), - ), - Card( - elevation: 5, - color: Colors.white, - shape: RoundedRectangleBorder( - borderRadius: - BorderRadius.circular(screensize.width / 20), - ), - child: Container( - padding: EdgeInsets.symmetric( - horizontal: 10, vertical: 10.0), - child: TextFormField( - autovalidateMode: model.signupValidate, - focusNode: model.password, - textInputAction: TextInputAction.done, - validator: (value) => - Validator.validatePassword(value), - controller: model.signupPasswordController, - obscureText: model.obscureTextSignup, - style: TextStyle(fontSize: 16.0, color: Colors.black), - decoration: InputDecoration( - border: InputBorder.none, - icon: Icon( - Icons.lock, - color: Colors.black, - size: 24, - ), - suffixIcon: IconButton( - onPressed: () => model.displayPasswordSignup(), - icon: Icon( - model.obscureTextSignup - ? Icons.visibility - : Icons.visibility_off, - size: 20.0, - color: Colors.black, - ), - ), - hintText: "Password", - hintStyle: TextStyle( - fontSize: hintsize - 2, color: hintColor), - ), - ), - ), - ), - ])), - ), - SizedBox( - height: 3.5.h, - ), - Container( - // margin: EdgeInsets.only(top: 300.0), - decoration: new BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(5.0)), - ), - child: HikeButton( - onTap: () => model.nextSignup(), - text: 'SIGN UP', - ), - ), - ], - ), - ), - ); - } - - Widget separator() { - return Container( - width: 62.w, - height: 0.2.h, - color: Colors.grey[400], - ); - } -} +import 'package:beacon/components/hike_button.dart'; +import 'package:beacon/components/shape_painter.dart'; +import 'package:beacon/services/validators.dart'; +import 'package:beacon/utilities/constants.dart'; +import 'package:beacon/utilities/indication_painter.dart'; +import 'package:beacon/view_model/auth_screen_model.dart'; +import 'package:beacon/views/base_view.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:sizer/sizer.dart'; + +import '../components/loading_screen.dart'; + +class AuthScreen extends StatefulWidget { + const AuthScreen({Key key}) : super(key: key); + + @override + _AuthScreenState createState() => _AuthScreenState(); +} + +class _AuthScreenState extends State + with SingleTickerProviderStateMixin { + Future _onPopHome() async { + return showDialog( + context: context, + builder: (context) => AlertDialog( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ), + actionsAlignment: MainAxisAlignment.spaceEvenly, + contentPadding: EdgeInsets.all(25.0), + title: Text( + 'Confirm Exit', + style: TextStyle(fontSize: 25, color: kYellow), + ), + content: Text( + 'Do you really want to exit?', + style: TextStyle(fontSize: 18, color: kBlack), + ), + actions: [ + HikeButton( + buttonHeight: 2.5.h, + buttonWidth: 8.w, + onTap: () => Navigator.of(context).pop(false), + text: 'No', + ), + HikeButton( + buttonHeight: 2.5.h, + buttonWidth: 8.w, + onTap: () => + SystemChannels.platform.invokeMethod('SystemNavigator.pop'), + text: 'Yes', + ), + ], + ), + ); + } + + @override + Widget build(BuildContext context) { + Size screensize = MediaQuery.of(context).size; + return WillPopScope( + onWillPop: _onPopHome, + child: BaseView( + builder: (context, model, child) { + return (model.isBusy) + ? LoadingScreen() + : new Scaffold( + key: model.scaffoldKey, + resizeToAvoidBottomInset: true, + body: Container( + width: screensize.width, + height: + screensize.height >= 775.0 ? screensize.height : 775.0, + child: Stack( + children: [ + CustomPaint( + size: Size(screensize.width, screensize.height), + painter: ShapePainter(), + ), + Container( + alignment: Alignment.center, + padding: + EdgeInsets.only(top: screensize.height / 3.5), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Padding( + padding: EdgeInsets.only(top: 20.0), + child: _buildMenuBar(context, model), + ), + Expanded( + flex: 2, + child: PageView( + controller: model.pageController, + onPageChanged: (i) { + if (i == 0) { + setState(() { + model.right = Colors.black; + model.left = Colors.white; + }); + Future.delayed( + Duration(milliseconds: 500), () { + model.requestFocusForFocusNode( + model.emailLogin); + }); + } else if (i == 1) { + setState(() { + model.right = Colors.white; + model.left = Colors.black; + }); + Future.delayed( + Duration(milliseconds: 500), () { + model.requestFocusForFocusNode( + model.name); + }); + } + }, + children: [ + new ConstrainedBox( + constraints: + const BoxConstraints.expand(), + child: _buildSignIn(context, model), + ), + new ConstrainedBox( + constraints: + const BoxConstraints.expand(), + child: _buildSignUp(context, model), + ), + ], + ), + ), + ], + ), + ), + ], + ), + ), + ); + }, + ), + ); + } + + Widget _buildMenuBar(BuildContext context, AuthViewModel model) { + Size screensize = MediaQuery.of(context).size; + return Container( + padding: EdgeInsets.symmetric(horizontal: 13.5.w), + width: screensize.width, + height: screensize.height < 800 ? 7.5.h : 6.h, + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(25.0)), + ), + child: CustomPaint( + painter: TabIndicationPainter(pageController: model.pageController), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Expanded( + child: TextButton( + style: ButtonStyle( + overlayColor: MaterialStateProperty.all(Colors.transparent), + ), + //highlightColor: Colors.white, + onPressed: model.onSignInButtonPress, + child: Text( + "Existing", + style: TextStyle( + color: model.left, + fontSize: 18.0, + ), + ), + ), + ), + Expanded( + child: TextButton( + style: ButtonStyle( + overlayColor: MaterialStateProperty.all(Colors.transparent), + ), + onPressed: model.onSignUpButtonPress, + child: Text( + "New", + style: TextStyle( + color: model.right, + fontSize: 18.0, + ), + ), + ), + ), + ], + ), + ), + ); + } + + Widget _buildSignIn(BuildContext context, AuthViewModel model) { + Size screensize = MediaQuery.of(context).size; + return SingleChildScrollView( + child: Container( + padding: EdgeInsets.only(top: 3.h, left: 8.5.w, right: 8.5.w), + width: screensize.width, + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Form( + key: model.formKeyLogin, + autovalidateMode: model.loginValidate, + child: Wrap( + children: [ + Card( + elevation: 2.0, + color: Colors.white, + shape: RoundedRectangleBorder( + borderRadius: + BorderRadius.circular(screensize.width / 20), + ), + child: Container( + // height: 13.h, + padding: EdgeInsets.symmetric( + horizontal: 10, + vertical: 10, + ), + child: TextFormField( + autovalidateMode: model.loginValidate, + focusNode: model.emailLogin, + controller: model.loginEmailController, + validator: (value) => + Validator.validateEmail(value.trimRight()), + keyboardType: TextInputType.emailAddress, + style: TextStyle(fontSize: 16.0, color: Colors.black), + decoration: InputDecoration( + border: InputBorder.none, + icon: Icon( + Icons.mail_outline, + color: Colors.black, + size: 24.0, + ), + hintText: "Email Address", + hintStyle: TextStyle( + fontSize: hintsize - 2, color: hintColor), + ), + ), + ), + ), + Card( + elevation: 2.0, + color: Colors.white, + shape: RoundedRectangleBorder( + borderRadius: + BorderRadius.circular(screensize.width / 20), + ), + child: Container( + padding: + EdgeInsets.symmetric(horizontal: 10, vertical: 10.0), + child: TextFormField( + autovalidateMode: model.loginValidate, + focusNode: model.passwordLogin, + controller: model.loginPasswordController, + obscureText: model.obscureTextLogin, + validator: (value) => Validator.validatePassword(value), + style: TextStyle(fontSize: 16.0, color: Colors.black), + decoration: InputDecoration( + border: InputBorder.none, + icon: Icon( + Icons.lock, + size: 24.0, + color: Colors.black, + ), + hintText: "Password", + hintStyle: TextStyle( + fontSize: hintsize - 2, color: hintColor), + suffixIcon: IconButton( + onPressed: () => model.displayPasswordLogin(), + icon: Icon( + model.obscureTextLogin + ? Icons.visibility + : Icons.visibility_off, + size: 20.0, + color: Colors.black, + ), + ), + ), + ), + ), + ), + ], + ), + ), + SizedBox( + height: 3.5.h, + ), + HikeButton( + onTap: model.nextLogin, + text: 'LOGIN', + ), + Padding( + padding: EdgeInsets.only( + left: 15.0, right: 15.0, top: 15.0, bottom: 15.0), + child: Text( + "OR", + style: TextStyle( + color: Colors.black, + fontSize: 16.0, + ), + ), + ), + HikeButton( + onTap: () => model.loginAsGuest(), + text: 'LOGIN AS GUEST', + ), + ], + ), + ), + ); + } + + Widget _buildSignUp(BuildContext context, AuthViewModel model) { + Size screensize = MediaQuery.of(context).size; + return SingleChildScrollView( + child: Container( + padding: EdgeInsets.only(top: 3.h, left: 8.5.w, right: 8.5.w), + child: Column( + children: [ + Form( + key: model.formKeySignup, + autovalidateMode: model.signupValidate, + child: Container( + width: screensize.width - 70, + // height: 280.0, + child: Column(children: [ + Card( + elevation: 2, + color: Colors.white, + shape: RoundedRectangleBorder( + borderRadius: + BorderRadius.circular(screensize.width / 20), + ), + child: Container( + padding: EdgeInsets.symmetric( + horizontal: 10, vertical: 10.0), + child: TextFormField( + autovalidateMode: model.signupValidate, + validator: (value) => Validator.validateName(value), + focusNode: model.name, + textInputAction: TextInputAction.next, + controller: model.signupNameController, + keyboardType: TextInputType.text, + textCapitalization: TextCapitalization.words, + style: TextStyle(fontSize: 18.0, color: Colors.black), + decoration: InputDecoration( + border: InputBorder.none, + icon: Icon( + Icons.account_box, + color: Colors.black, + size: 24, + ), + hintText: "Name", + hintStyle: TextStyle( + fontSize: hintsize - 2, color: hintColor), + ), + ), + ), + ), + Card( + elevation: 2, + color: Colors.white, + shape: RoundedRectangleBorder( + borderRadius: + BorderRadius.circular(screensize.width / 20), + ), + child: Container( + padding: EdgeInsets.symmetric( + horizontal: 10, vertical: 10.0), + child: TextFormField( + autovalidateMode: model.signupValidate, + validator: (value) => Validator.validateEmail(value), + focusNode: model.email, + textInputAction: TextInputAction.next, + controller: model.signupEmailController, + keyboardType: TextInputType.emailAddress, + style: TextStyle(fontSize: 16.0, color: Colors.black), + decoration: InputDecoration( + border: InputBorder.none, + icon: Icon( + Icons.mail, + color: Colors.black, + size: 24, + ), + hintText: "Email Address", + hintStyle: TextStyle( + fontSize: hintsize - 2, color: hintColor), + ), + ), + ), + ), + Card( + elevation: 2, + color: Colors.white, + shape: RoundedRectangleBorder( + borderRadius: + BorderRadius.circular(screensize.width / 20), + ), + child: Container( + padding: EdgeInsets.symmetric( + horizontal: 10, vertical: 10.0), + child: TextFormField( + autovalidateMode: model.signupValidate, + focusNode: model.password, + textInputAction: TextInputAction.done, + validator: (value) => + Validator.validatePassword(value), + controller: model.signupPasswordController, + obscureText: model.obscureTextSignup, + style: TextStyle(fontSize: 16.0, color: Colors.black), + decoration: InputDecoration( + border: InputBorder.none, + icon: Icon( + Icons.lock, + color: Colors.black, + size: 24, + ), + suffixIcon: IconButton( + onPressed: () => model.displayPasswordSignup(), + icon: Icon( + model.obscureTextSignup + ? Icons.visibility + : Icons.visibility_off, + size: 20.0, + color: Colors.black, + ), + ), + hintText: "Password", + hintStyle: TextStyle( + fontSize: hintsize - 2, color: hintColor), + ), + ), + ), + ), + ])), + ), + SizedBox( + height: 3.5.h, + ), + Container( + // margin: EdgeInsets.only(top: 300.0), + decoration: new BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(5.0)), + ), + child: HikeButton( + onTap: () => model.nextSignup(), + text: 'SIGN UP', + ), + ), + ], + ), + ), + ); + } + + Widget separator() { + return Container( + width: 62.w, + height: 0.2.h, + color: Colors.grey[400], + ); + } +} diff --git a/lib/views/group_screen.dart b/lib/views/group_screen.dart index 5b62a19e..b0acd274 100644 --- a/lib/views/group_screen.dart +++ b/lib/views/group_screen.dart @@ -1,522 +1,479 @@ -import 'package:beacon/components/beacon_card.dart'; -import 'package:beacon/components/create_join_dialog.dart'; -import 'package:beacon/components/hike_button.dart'; -import 'package:beacon/components/loading_screen.dart'; -import 'package:beacon/components/shape_painter.dart'; -import 'package:beacon/locator.dart'; -import 'package:beacon/models/beacon/beacon.dart'; -import 'package:beacon/utilities/constants.dart'; -import 'package:beacon/view_model/group_screen_view_model.dart'; -import 'package:beacon/views/base_view.dart'; -import 'package:custom_refresh_indicator/custom_refresh_indicator.dart'; -import 'package:flutter/material.dart'; -import 'package:modal_progress_hud/modal_progress_hud.dart'; -import 'package:sizer/sizer.dart'; - -import '../models/group/group.dart'; - -class GroupScreen extends StatefulWidget { - final Group group; - GroupScreen(this.group); - - @override - _GroupScreenState createState() => _GroupScreenState(); -} - -class _GroupScreenState extends State - with TickerProviderStateMixin { - var fetchingUserBeacons; - var fetchingNearbyBeacons; - TabControllerStorage tabControllerStorage = TabControllerStorage(); - - @override - void initState() { - fetchingUserBeacons = databaseFunctions.fetchUserBeacons(widget.group.id); - fetchingNearbyBeacons = - databaseFunctions.fetchNearbyBeacon(widget.group.id); - super.initState(); - } - - void reloadNearByBeacons() { - setState(() { - fetchingNearbyBeacons = - databaseFunctions.fetchNearbyBeacon(widget.group.id); - }); - } - - void reloadUserBeacons() { - setState(() { - fetchingUserBeacons = databaseFunctions.fetchUserBeacons(widget.group.id); - }); - } - - void reloadList() { - setState(() { - fetchingUserBeacons = databaseFunctions.fetchUserBeacons(widget.group.id); - fetchingNearbyBeacons = - databaseFunctions.fetchNearbyBeacon(widget.group.id); - }); - } - - @override - Widget build(BuildContext context) { - return BaseView(builder: (context, model, child) { - TabController tabController = new TabController( - length: 2, - vsync: this, - initialIndex: tabControllerStorage.tabIndex, - ); - return model.isBusy - ? LoadingScreen() - : Scaffold( - resizeToAvoidBottomInset: false, - body: SafeArea( - child: ModalProgressHUD( - inAsyncCall: model.isCreatingHike, - child: Stack( - children: [ - CustomPaint( - size: Size(MediaQuery.of(context).size.width, - MediaQuery.of(context).size.height - 200), - painter: ShapePainter(), - ), - // Creating a back button - // Align( - // alignment: Alignment(-0.9, -0.8), - // child: FloatingActionButton( - // onPressed: () => navigationService.pop(), - // backgroundColor: kYellow, - // child: Icon(Icons.arrow_back_rounded), - // ), - // ), - Align( - alignment: Alignment(-0.7, -0.95), - child: Container( - width: MediaQuery.of(context).size.width * 0.6, - child: Text( - 'Welcome to Group ' + widget.group.title, - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 25, - color: Colors.white, - ), - ), - ), - ), - Align( - alignment: Alignment(0.9, -0.8), - child: FloatingActionButton( - onPressed: () => showDialog( - context: context, - builder: (context) => AlertDialog( - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(10.0), - ), - actionsAlignment: - MainAxisAlignment.spaceEvenly, - title: Text( - (userConfig.currentUser.isGuest) - ? 'Create Account' - : 'Logout', - style: TextStyle( - fontSize: 25, color: kYellow), - ), - content: Text( - (userConfig.currentUser.isGuest) - ? 'Would you like to create an account?' - : 'Are you sure you wanna logout?', - style: TextStyle( - fontSize: 16, color: kBlack), - ), - actions: [ - HikeButton( - buttonHeight: 2.5.h, - buttonWidth: 8.w, - onTap: () => - Navigator.of(context).pop(false), - text: 'No', - textSize: 18.0, - ), - HikeButton( - buttonHeight: 2.5.h, - buttonWidth: 8.w, - onTap: () { - navigationService.pop(); - model.logout(); - }, - text: 'Yes', - textSize: 18.0, - ), - ], - )), - backgroundColor: kYellow, - child: (userConfig.currentUser.isGuest) - ? Icon(Icons.person) - : Icon(Icons.logout), - ), - ), - Padding( - padding: EdgeInsets.fromLTRB(4.w, 25.h, 4.w, 5), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - mainAxisSize: MainAxisSize.max, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Container( - width: 45.w, - child: HikeButton( - buttonWidth: homebwidth, - buttonHeight: homebheight - 2, - 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, - reloadList, - widget.group.id); - } - }, - ), - ), - SizedBox( - width: 1.w, - ), - Container( - width: 45.w, - child: HikeButton( - buttonWidth: homebwidth, - buttonHeight: homebheight - 2, - text: 'Join a Hike', - textColor: kYellow, - borderColor: kYellow, - buttonColor: Colors.white, - onTap: () async { - CreateJoinBeaconDialog.joinBeaconDialog( - context, model, reloadList); - }, - ), - ), - ], - ), - ), - Column( - mainAxisAlignment: MainAxisAlignment.end, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Container( - height: MediaQuery.of(context).size.height * 0.565, - margin: EdgeInsets.only(top: 20), - decoration: BoxDecoration( - color: kLightBlue, - borderRadius: BorderRadius.only( - topLeft: const Radius.circular(50.0), - topRight: const Radius.circular(50.0), - ), - ), - child: Column( - children: [ - TabBar( - indicatorSize: TabBarIndicatorSize.tab, - indicatorColor: kBlue, - labelColor: kBlack, - tabs: [ - Tab(text: 'Your Beacons'), - Tab(text: 'Nearby Beacons'), - ], - controller: tabController, - onTap: (index) { - setState(() { - tabControllerStorage.setIndex = index; - }); - }, - ), - Expanded( - child: TabBarView( - controller: tabController, - children: [ - Padding( - padding: const EdgeInsets.all(12.0), - child: FutureBuilder( - future: fetchingUserBeacons, - builder: (context, snapshot) { - if (snapshot.connectionState == - ConnectionState.done) { - if (snapshot.hasError) { - return Center( - child: Text( - snapshot.error.toString(), - textAlign: TextAlign.center, - textScaleFactor: 1.3, - ), - ); - } - final List posts = - snapshot.data; - return Container( - alignment: Alignment.center, - child: posts.length == 0 - ? CustomRefreshIndicator( - onRefresh: () async { - reloadUserBeacons(); - }, - builder: - MaterialIndicatorDelegate( - builder: (context, - controller) { - return Icon( - Icons - .location_on, - color: - Colors.blue, - size: 30, - ); - }, - ), - child: - SingleChildScrollView( - physics: - AlwaysScrollableScrollPhysics(), - child: Column( - children: [ - Text( - 'You haven\'t joined or created any beacon yet', - textAlign: - TextAlign - .center, - style: TextStyle( - color: - kBlack, - fontSize: - 20), - ), - SizedBox( - height: 2.h, - ), - RichText( - text: - TextSpan( - // textAlign: - // TextAlign - // .center, - style: TextStyle( - color: - kBlack, - fontSize: - 20), - children: [ - TextSpan( - text: - 'Join', - style: - TextStyle(fontWeight: FontWeight.bold)), - TextSpan( - text: - ' a Hike or '), - TextSpan( - text: - 'Create', - style: - TextStyle(fontWeight: FontWeight.bold)), - TextSpan( - text: - ' a new one! '), - ], - ), - ), - ], - ), - ), - ) - : CustomRefreshIndicator( - onRefresh: () async { - reloadUserBeacons(); - }, - builder: - MaterialIndicatorDelegate( - builder: (context, - controller) { - return Icon( - Icons - .location_on, - color: - Colors.blue, - size: 30, - ); - }, - ), - child: - ListView.builder( - physics: - AlwaysScrollableScrollPhysics(), - scrollDirection: - Axis.vertical, - itemCount: - posts?.length, - padding: - EdgeInsets.all( - 8), - itemBuilder: - (context, - index) { - return BeaconCustomWidgets - .getBeaconCard( - context, - posts[ - index]); - }, - ), - )); - } else { - return Center( - child: BeaconCustomWidgets - .getPlaceholder(), - ); - } - }, - ), - ), - Padding( - padding: const EdgeInsets.all(12.0), - child: Container( - alignment: Alignment.center, - child: FutureBuilder( - future: fetchingNearbyBeacons, - builder: (context, snapshot) { - if (snapshot.connectionState == - ConnectionState.waiting) - return Center( - child: BeaconCustomWidgets - .getPlaceholder(), - ); - if (snapshot.connectionState == - ConnectionState.done) { - if (snapshot.hasError) { - return Center( - child: Text( - snapshot.error.toString(), - textAlign: - TextAlign.center, - textScaleFactor: 1.3, - ), - ); - } - - final posts = snapshot.data; - - if (posts == null || - posts.length == 0) { - return CustomRefreshIndicator( - onRefresh: () async { - reloadNearByBeacons(); - }, - builder: - MaterialIndicatorDelegate( - builder: (context, - controller) { - return Icon( - Icons.location_on, - color: Colors.blue, - size: 30, - ); - }, - ), - child: - SingleChildScrollView( - physics: - AlwaysScrollableScrollPhysics(), - child: Center( - child: Text( - 'No nearby beacons found :(', - style: TextStyle( - color: kBlack, - fontSize: 20), - ), - ), - ), - ); - } - return CustomRefreshIndicator( - onRefresh: () async { - reloadNearByBeacons(); - }, - builder: - MaterialIndicatorDelegate( - builder: - (context, controller) { - return Icon( - Icons.location_on, - color: Colors.blue, - size: 30, - ); - }, - ), - child: ListView.builder( - physics: - AlwaysScrollableScrollPhysics(), - scrollDirection: - Axis.vertical, - itemCount: posts.length, - padding: EdgeInsets.all(8), - itemBuilder: - (context, index) { - return BeaconCustomWidgets - .getBeaconCard( - context, - posts[index]); - }, - ), - ); - } else { - return SingleChildScrollView( - physics: - AlwaysScrollableScrollPhysics(), - child: Center( - child: Text( - 'No nearby beacons found :(', - style: TextStyle( - color: kBlack, - fontSize: 18))), - ); - } - }, - ), - ), - ), - ], - ), - ), - ], - ), - ), - ], - ), - ], - ), - ), - ), - ); - }); - } -} - -class TabControllerStorage { - static final TabControllerStorage _storage = TabControllerStorage._internal(); - - factory TabControllerStorage() => _storage; - - static int _tabIndex = 0; - - int get tabIndex => _tabIndex; - set setIndex(int index) { - _tabIndex = index; - } - - TabControllerStorage._internal(); -} +import 'package:beacon/components/beacon_card.dart'; +import 'package:beacon/components/create_join_dialog.dart'; +import 'package:beacon/components/hike_button.dart'; +import 'package:beacon/components/loading_screen.dart'; +import 'package:beacon/components/reloading_icon.dart'; +import 'package:beacon/components/shape_painter.dart'; +import 'package:beacon/locator.dart'; +import 'package:beacon/models/beacon/beacon.dart'; +import 'package:beacon/utilities/constants.dart'; +import 'package:beacon/view_model/group_screen_view_model.dart'; +import 'package:beacon/views/base_view.dart'; +import 'package:custom_refresh_indicator/custom_refresh_indicator.dart'; +import 'package:flutter/material.dart'; +import 'package:modal_progress_hud/modal_progress_hud.dart'; +import 'package:sizer/sizer.dart'; + +import '../models/group/group.dart'; + +class GroupScreen extends StatefulWidget { + final Group group; + GroupScreen(this.group); + + @override + _GroupScreenState createState() => _GroupScreenState(); +} + +class _GroupScreenState extends State + with TickerProviderStateMixin { + var fetchingUserBeacons; + var fetchingNearbyBeacons; + TabControllerStorage tabControllerStorage = TabControllerStorage(); + + @override + void initState() { + fetchingUserBeacons = databaseFunctions.fetchUserBeacons(widget.group.id); + fetchingNearbyBeacons = + databaseFunctions.fetchNearbyBeacon(widget.group.id); + super.initState(); + } + + void reloadNearByBeacons() { + setState(() { + fetchingNearbyBeacons = + databaseFunctions.fetchNearbyBeacon(widget.group.id); + }); + } + + void reloadUserBeacons() { + setState(() { + fetchingUserBeacons = databaseFunctions.fetchUserBeacons(widget.group.id); + }); + } + + void reloadList() { + setState(() { + fetchingUserBeacons = databaseFunctions.fetchUserBeacons(widget.group.id); + fetchingNearbyBeacons = + databaseFunctions.fetchNearbyBeacon(widget.group.id); + }); + } + + @override + Widget build(BuildContext context) { + return BaseView(builder: (context, model, child) { + TabController tabController = new TabController( + length: 2, + vsync: this, + initialIndex: tabControllerStorage.tabIndex, + ); + return model.isBusy + ? LoadingScreen() + : Scaffold( + resizeToAvoidBottomInset: false, + body: SafeArea( + child: ModalProgressHUD( + inAsyncCall: model.isCreatingHike, + child: Stack( + children: [ + CustomPaint( + size: Size(MediaQuery.of(context).size.width, + MediaQuery.of(context).size.height - 200), + painter: ShapePainter(), + ), + // Creating a back button + // Align( + // alignment: Alignment(-0.9, -0.8), + // child: FloatingActionButton( + // onPressed: () => navigationService.pop(), + // backgroundColor: kYellow, + // child: Icon(Icons.arrow_back_rounded), + // ), + // ), + Align( + alignment: Alignment(-0.7, -0.95), + child: Container( + width: MediaQuery.of(context).size.width * 0.6, + child: Text( + 'Welcome to Group ' + widget.group.title, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 25, + color: Colors.white, + ), + ), + ), + ), + Align( + alignment: Alignment(0.9, -0.8), + child: FloatingActionButton( + onPressed: () => showDialog( + context: context, + builder: (context) => AlertDialog( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ), + actionsAlignment: + MainAxisAlignment.spaceEvenly, + title: Text( + (userConfig.currentUser.isGuest) + ? 'Create Account' + : 'Logout', + style: TextStyle( + fontSize: 25, color: kYellow), + ), + content: Text( + (userConfig.currentUser.isGuest) + ? 'Would you like to create an account?' + : 'Are you sure you wanna logout?', + style: TextStyle( + fontSize: 16, color: kBlack), + ), + actions: [ + HikeButton( + buttonHeight: 2.5.h, + buttonWidth: 8.w, + onTap: () => + Navigator.of(context).pop(false), + text: 'No', + textSize: 18.0, + ), + HikeButton( + buttonHeight: 2.5.h, + buttonWidth: 8.w, + onTap: () { + navigationService.pop(); + model.logout(); + }, + text: 'Yes', + textSize: 18.0, + ), + ], + )), + backgroundColor: kYellow, + child: (userConfig.currentUser.isGuest) + ? Icon(Icons.person) + : Icon(Icons.logout), + ), + ), + Padding( + padding: EdgeInsets.fromLTRB(4.w, 25.h, 4.w, 5), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + mainAxisSize: MainAxisSize.max, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Container( + width: 45.w, + child: HikeButton( + buttonWidth: homebwidth, + buttonHeight: homebheight - 2, + 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, + reloadList, + widget.group.id); + } + }, + ), + ), + SizedBox( + width: 1.w, + ), + Container( + width: 45.w, + child: HikeButton( + buttonWidth: homebwidth, + buttonHeight: homebheight - 2, + text: 'Join a Hike', + textColor: kYellow, + borderColor: kYellow, + buttonColor: Colors.white, + onTap: () async { + CreateJoinBeaconDialog.joinBeaconDialog( + context, model, reloadList); + }, + ), + ), + ], + ), + ), + Column( + mainAxisAlignment: MainAxisAlignment.end, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Container( + height: MediaQuery.of(context).size.height * 0.565, + margin: EdgeInsets.only(top: 20), + decoration: BoxDecoration( + color: kLightBlue, + borderRadius: BorderRadius.only( + topLeft: const Radius.circular(50.0), + topRight: const Radius.circular(50.0), + ), + ), + child: Column( + children: [ + TabBar( + indicatorSize: TabBarIndicatorSize.tab, + indicatorColor: kBlue, + labelColor: kBlack, + tabs: [ + Tab(text: 'Your Beacons'), + Tab(text: 'Nearby Beacons'), + ], + controller: tabController, + onTap: (index) { + setState(() { + tabControllerStorage.setIndex = index; + }); + }, + ), + Expanded( + child: TabBarView( + controller: tabController, + children: [ + Padding( + padding: const EdgeInsets.all(12.0), + child: FutureBuilder( + future: fetchingUserBeacons, + builder: (context, snapshot) { + if (snapshot.connectionState == + ConnectionState.done) { + if (snapshot.hasError) { + return Center( + child: Text( + snapshot.error.toString(), + textAlign: TextAlign.center, + textScaleFactor: 1.3, + ), + ); + } + final List posts = + snapshot.data; + return Container( + alignment: Alignment.center, + child: CustomRefreshIndicator( + onRefresh: () async { + reloadUserBeacons(); + }, + builder: + MaterialIndicatorDelegate( + builder: + (context, controller) { + return ReloadIcon(); + }, + ), + child: posts == null || + posts.length == 0 + ? SingleChildScrollView( + physics: + AlwaysScrollableScrollPhysics(), + child: Column( + children: [ + Text( + 'You haven\'t joined or created any beacon yet', + textAlign: + TextAlign + .center, + style: TextStyle( + color: + kBlack, + fontSize: + 20), + ), + SizedBox( + height: 2.h, + ), + RichText( + text: TextSpan( + // textAlign: + // TextAlign + // .center, + style: TextStyle( + color: + kBlack, + fontSize: + 20), + children: [ + TextSpan( + text: + 'Join', + style: TextStyle( + fontWeight: + FontWeight.bold)), + TextSpan( + text: + ' a Hike or '), + TextSpan( + text: + 'Create', + style: TextStyle( + fontWeight: + FontWeight.bold)), + TextSpan( + text: + ' a new one! '), + ], + ), + ), + ], + ), + ) + : ListView.builder( + physics: + AlwaysScrollableScrollPhysics(), + scrollDirection: + Axis.vertical, + itemCount: + posts?.length, + padding: + EdgeInsets.all(8), + itemBuilder: + (context, index) { + return BeaconCustomWidgets + .getBeaconCard( + context, + posts[ + index]); + }, + ), + ), + ); + } else { + return Center( + child: BeaconCustomWidgets + .getPlaceholder(), + ); + } + }, + ), + ), + Padding( + padding: const EdgeInsets.all(12.0), + child: Container( + alignment: Alignment.center, + child: FutureBuilder( + future: fetchingNearbyBeacons, + builder: (context, snapshot) { + if (snapshot.connectionState == + ConnectionState.waiting) + return Center( + child: BeaconCustomWidgets + .getPlaceholder(), + ); + if (snapshot.connectionState == + ConnectionState.done) { + if (snapshot.hasError) { + return Center( + child: Text( + snapshot.error.toString(), + textAlign: + TextAlign.center, + textScaleFactor: 1.3, + ), + ); + } + + final posts = snapshot.data; + + return CustomRefreshIndicator( + onRefresh: () async { + reloadNearByBeacons(); + }, + builder: + MaterialIndicatorDelegate( + builder: + (context, controller) { + return ReloadIcon(); + }, + ), + child: posts == null || + posts.length == 0 + ? SingleChildScrollView( + physics: + AlwaysScrollableScrollPhysics(), + child: Center( + child: Text( + 'No nearby beacons found :(', + style: TextStyle( + color: kBlack, + fontSize: 20), + ), + ), + ) + : ListView.builder( + physics: + AlwaysScrollableScrollPhysics(), + scrollDirection: + Axis.vertical, + itemCount: + posts.length, + padding: + EdgeInsets.all(8), + itemBuilder: + (context, index) { + return BeaconCustomWidgets + .getBeaconCard( + context, + posts[ + index]); + }, + ), + ); + } else { + return SingleChildScrollView( + physics: + AlwaysScrollableScrollPhysics(), + child: Center( + child: Text( + 'No nearby beacons found :(', + style: TextStyle( + color: kBlack, + fontSize: 18))), + ); + } + }, + ), + ), + ), + ], + ), + ), + ], + ), + ), + ], + ), + ], + ), + ), + ), + ); + }); + } +} + +class TabControllerStorage { + static final TabControllerStorage _storage = TabControllerStorage._internal(); + + factory TabControllerStorage() => _storage; + + static int _tabIndex = 0; + + int get tabIndex => _tabIndex; + set setIndex(int index) { + _tabIndex = index; + } + + TabControllerStorage._internal(); +} From 2ae0541b79a8a49f7dab5090eeddc3d9139bc295 Mon Sep 17 00:00:00 2001 From: Rushikesh Patade <72869428+Rushour0@users.noreply.github.com> Date: Thu, 5 Jan 2023 22:12:41 +0530 Subject: [PATCH 6/7] reloading icon rotating + hike button border fixed --- lib/components/hike_button.dart | 94 +++++++++++++++--------------- lib/components/reloading_icon.dart | 44 ++++++++++++++ 2 files changed, 91 insertions(+), 47 deletions(-) create mode 100644 lib/components/reloading_icon.dart diff --git a/lib/components/hike_button.dart b/lib/components/hike_button.dart index a87a6423..3c8263e5 100644 --- a/lib/components/hike_button.dart +++ b/lib/components/hike_button.dart @@ -1,47 +1,47 @@ -import 'package:beacon/utilities/constants.dart'; -import 'package:flutter/material.dart'; - -class HikeButton extends StatelessWidget { - final Function onTap; - final String text; - final double textSize; - final Color textColor; - final Color borderColor; - final Color buttonColor; - final double buttonWidth; - final double buttonHeight; - HikeButton( - {this.onTap, - this.borderColor = Colors.white, - this.buttonColor = kYellow, - this.text, - this.textColor = Colors.white, - this.buttonWidth = optbwidth, - this.buttonHeight = optbheight, - this.textSize = 18}); - - @override - Widget build(BuildContext context) { - final Size screensize = MediaQuery.of(context).size; - return ElevatedButton( - style: ElevatedButton.styleFrom( - primary: buttonColor, - shape: RoundedRectangleBorder( - borderRadius: new BorderRadius.circular(screensize.width), - side: BorderSide( - color: borderColor, - ), - ), - ), - child: Padding( - padding: EdgeInsets.symmetric( - horizontal: buttonWidth, vertical: buttonHeight), - child: Text( - text, - style: TextStyle(color: textColor, fontSize: textSize), - ), - ), - onPressed: onTap, - ); - } -} +import 'package:beacon/utilities/constants.dart'; +import 'package:flutter/material.dart'; + +class HikeButton extends StatelessWidget { + final Function onTap; + final String text; + final double textSize; + final Color textColor; + final Color borderColor; + final Color buttonColor; + final double buttonWidth; + final double buttonHeight; + HikeButton( + {this.onTap, + this.borderColor = Colors.white, + this.buttonColor = kYellow, + this.text, + this.textColor = Colors.white, + this.buttonWidth = optbwidth, + this.buttonHeight = optbheight, + this.textSize = 18}); + + @override + Widget build(BuildContext context) { + final Size screensize = MediaQuery.of(context).size; + return ElevatedButton( + style: ElevatedButton.styleFrom( + primary: buttonColor, + shape: RoundedRectangleBorder( + borderRadius: new BorderRadius.circular(50), + side: BorderSide( + color: borderColor, + ), + ), + ), + child: Padding( + padding: EdgeInsets.symmetric( + horizontal: buttonWidth, vertical: buttonHeight), + child: Text( + text, + style: TextStyle(color: textColor, fontSize: textSize), + ), + ), + onPressed: onTap, + ); + } +} diff --git a/lib/components/reloading_icon.dart b/lib/components/reloading_icon.dart new file mode 100644 index 00000000..d0229467 --- /dev/null +++ b/lib/components/reloading_icon.dart @@ -0,0 +1,44 @@ +import 'package:beacon/utilities/constants.dart'; +import 'package:flutter/material.dart'; + +class ReloadIcon extends StatefulWidget { + const ReloadIcon({Key key}) : super(key: key); + + @override + State createState() => _ReloadIconState(); +} + +class _ReloadIconState extends State with TickerProviderStateMixin { + AnimationController _animation; + @override + void initState() { + super.initState(); + _animation = AnimationController( + vsync: this, + duration: Duration(seconds: 10), + upperBound: 1, + )..repeat(); + } + + @override + void dispose() { + _animation.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + _animation..forward(); + return RotationTransition( + turns: Tween(begin: 0.0, end: 10.0).animate(_animation), + child: Transform.rotate( + angle: 0.5, + child: Icon( + Icons.refresh, + color: kBlue, + size: 30, + ), + ), + ); + } +} From 604642c1db521ea02a035cf7b0683d13dc496e35 Mon Sep 17 00:00:00 2001 From: Rushikesh Patade <72869428+Rushour0@users.noreply.github.com> Date: Sun, 22 Jan 2023 17:10:57 +0530 Subject: [PATCH 7/7] removed unnecessary "screensize" variable --- lib/components/hike_button.dart | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/components/hike_button.dart b/lib/components/hike_button.dart index 3c8263e5..304ef628 100644 --- a/lib/components/hike_button.dart +++ b/lib/components/hike_button.dart @@ -22,7 +22,6 @@ class HikeButton extends StatelessWidget { @override Widget build(BuildContext context) { - final Size screensize = MediaQuery.of(context).size; return ElevatedButton( style: ElevatedButton.styleFrom( primary: buttonColor,