diff --git a/unit2/lib/bloc/bloc/user_bloc.dart b/unit2/lib/bloc/bloc/user_bloc.dart index 7bd4eb5..00b0336 100644 --- a/unit2/lib/bloc/bloc/user_bloc.dart +++ b/unit2/lib/bloc/bloc/user_bloc.dart @@ -1,11 +1,9 @@ import 'package:barcode_scan2/barcode_scan2.dart'; import 'package:bloc/bloc.dart'; import 'package:equatable/equatable.dart'; -import 'package:flutter/material.dart'; import 'package:unit2/model/login_data/user_info/user_data.dart'; import 'package:unit2/model/login_data/version_info.dart'; import 'package:unit2/sevices/login_service/auth_service.dart'; -import 'package:unit2/widgets/error_state.dart'; import '../../utils/scanner.dart'; diff --git a/unit2/lib/bloc/bloc/user_event.dart b/unit2/lib/bloc/bloc/user_event.dart index 6aca194..5f3b49c 100644 --- a/unit2/lib/bloc/bloc/user_event.dart +++ b/unit2/lib/bloc/bloc/user_event.dart @@ -20,7 +20,6 @@ class UserLogin extends UserEvent { } class LoadLoggedInUser extends UserEvent { - // final UserData? userData; LoadLoggedInUser(); } diff --git a/unit2/lib/screens/sos/add_mobile.dart b/unit2/lib/screens/sos/add_mobile.dart index 128aaa8..8abe496 100644 --- a/unit2/lib/screens/sos/add_mobile.dart +++ b/unit2/lib/screens/sos/add_mobile.dart @@ -1,9 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_form_builder/flutter_form_builder.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:fluttericon/font_awesome_icons.dart'; -import 'package:form_builder_validators/form_builder_validators.dart'; -import 'package:go_router/go_router.dart'; import 'package:unit2/theme-data.dart/text-styles.dart'; import 'package:unit2/utils/screen_info.dart'; import '../../theme-data.dart/btn-style.dart'; @@ -112,8 +109,7 @@ class AddMobile extends StatelessWidget { onPressed: () { if (_formKey.currentState! .saveAndValidate()) { - context.go(context - .namedLocation('request-sos')); + } // } diff --git a/unit2/lib/screens/unit2/basic-info/basic-info.dart b/unit2/lib/screens/unit2/basic-info/basic-info.dart index b6b7d3b..7374720 100644 --- a/unit2/lib/screens/unit2/basic-info/basic-info.dart +++ b/unit2/lib/screens/unit2/basic-info/basic-info.dart @@ -3,12 +3,10 @@ import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_progress_hud/flutter_progress_hud.dart'; import 'package:flutter_svg/svg.dart'; import 'package:fluttericon/font_awesome5_icons.dart'; -import 'package:go_router/go_router.dart'; import 'package:intl/intl.dart'; import 'package:qr_flutter/qr_flutter.dart'; import 'package:unit2/bloc/bloc/user_bloc.dart'; import 'package:unit2/model/login_data/user_info/user_data.dart'; -import 'package:unit2/test_data.dart'; import 'package:unit2/theme-data.dart/btn-style.dart'; import 'package:unit2/utils/global.dart'; import 'package:unit2/utils/text_container.dart'; @@ -161,7 +159,6 @@ class BuildInformation extends StatelessWidget { style: mainBtnStyle(third, Colors.transparent, Colors.white54), onPressed: () { - context.goNamed('signature'); }, icon: const Icon( FontAwesome5.signature, diff --git a/unit2/lib/screens/unit2/homepage.dart/components/dashboard.dart b/unit2/lib/screens/unit2/homepage.dart/components/dashboard.dart index c5c9ec9..b1c591a 100644 --- a/unit2/lib/screens/unit2/homepage.dart/components/dashboard.dart +++ b/unit2/lib/screens/unit2/homepage.dart/components/dashboard.dart @@ -46,7 +46,6 @@ class DashBoard extends StatelessWidget { children: roles[index].roles.map((role) { return GestureDetector( onTap: () { - print("Role is click"); }, child: Column(children: [ Icon( diff --git a/unit2/lib/screens/unit2/homepage.dart/components/menu-screen.dart b/unit2/lib/screens/unit2/homepage.dart/components/menu-screen.dart index c8d3ba4..7a059ba 100644 --- a/unit2/lib/screens/unit2/homepage.dart/components/menu-screen.dart +++ b/unit2/lib/screens/unit2/homepage.dart/components/menu-screen.dart @@ -1,7 +1,6 @@ import 'package:flutter/material.dart'; import 'package:unit2/theme-data.dart/colors.dart'; import 'package:fluttericon/web_symbols_icons.dart'; -import 'package:fluttericon/typicons_icons.dart'; import 'package:fluttericon/font_awesome5_icons.dart'; import '../../../../model/login_data/user_info/user_data.dart'; import 'menu.dart'; diff --git a/unit2/lib/screens/unit2/homepage.dart/components/menu.dart b/unit2/lib/screens/unit2/homepage.dart/components/menu.dart index 8757065..5bf5982 100644 --- a/unit2/lib/screens/unit2/homepage.dart/components/menu.dart +++ b/unit2/lib/screens/unit2/homepage.dart/components/menu.dart @@ -1,6 +1,4 @@ import 'package:flutter/material.dart'; -import 'package:flutter_zoom_drawer/flutter_zoom_drawer.dart'; -import 'package:go_router/go_router.dart'; import 'package:unit2/model/login_data/user_info/user_data.dart'; import 'package:unit2/utils/alerts.dart'; import '../../../../theme-data.dart/colors.dart'; diff --git a/unit2/lib/screens/unit2/homepage.dart/module-screen.dart b/unit2/lib/screens/unit2/homepage.dart/module-screen.dart index f741589..96ed319 100644 --- a/unit2/lib/screens/unit2/homepage.dart/module-screen.dart +++ b/unit2/lib/screens/unit2/homepage.dart/module-screen.dart @@ -5,7 +5,6 @@ import 'package:fluttericon/font_awesome5_icons.dart'; import 'package:fluttericon/font_awesome_icons.dart'; import 'package:fluttericon/typicons_icons.dart'; import 'package:unit2/screens/unit2/homepage.dart/components/dashboard.dart'; -import 'package:unit2/test_data.dart'; import 'package:unit2/theme-data.dart/colors.dart'; import 'package:unit2/utils/text_container.dart'; diff --git a/unit2/lib/screens/unit2/login/components/update_required.dart b/unit2/lib/screens/unit2/login/components/update_required.dart index 9a0c4c4..b1b33d5 100644 --- a/unit2/lib/screens/unit2/login/components/update_required.dart +++ b/unit2/lib/screens/unit2/login/components/update_required.dart @@ -1,7 +1,5 @@ -import 'package:flutter/cupertino.dart'; + import 'package:flutter/material.dart'; -import 'package:flutter/src/widgets/container.dart'; -import 'package:flutter/src/widgets/framework.dart'; import 'package:flutter_svg/svg.dart'; import 'package:unit2/theme-data.dart/btn-style.dart'; @@ -60,9 +58,9 @@ class _UpdateState extends State { color: Colors.black, ), children: [ - TextSpan( + const TextSpan( text: "mobileVersion", - style: const TextStyle( + style: TextStyle( color: primary, fontWeight: FontWeight.bold)), const TextSpan( text: " did not match with the latest version ", diff --git a/unit2/lib/screens/unit2/login/functions/press-again-to-exit.dart b/unit2/lib/screens/unit2/login/functions/press-again-to-exit.dart index d430674..0b1e58d 100644 --- a/unit2/lib/screens/unit2/login/functions/press-again-to-exit.dart +++ b/unit2/lib/screens/unit2/login/functions/press-again-to-exit.dart @@ -1,7 +1,6 @@ -import 'dart:io'; + import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; import 'package:fluttertoast/fluttertoast.dart'; Future pressAgainToExit() async { diff --git a/unit2/lib/screens/unit2/login/login.dart b/unit2/lib/screens/unit2/login/login.dart index 93b3a03..3149ade 100644 --- a/unit2/lib/screens/unit2/login/login.dart +++ b/unit2/lib/screens/unit2/login/login.dart @@ -6,7 +6,6 @@ import 'package:flutter_form_builder/flutter_form_builder.dart'; import 'package:fluttericon/font_awesome5_icons.dart'; import 'package:fluttertoast/fluttertoast.dart'; import 'package:form_builder_validators/form_builder_validators.dart'; -import 'package:go_router/go_router.dart'; import 'package:flutter_progress_hud/flutter_progress_hud.dart'; import 'package:unit2/bloc/bloc/user_bloc.dart'; @@ -205,26 +204,10 @@ class _UniT2LoginState extends State { BlocProvider.of(context) .add(UserLogin( username: - "rjvincentlopeplopez", - password: "shesthequ33n" - // username: _formKey - // .currentState! - // .value['username'], - // password: _formKey - // .currentState! - // .value[ - // 'password'] - + _formKey.currentState!.value['username'], + password:_formKey.currentState!.value['password'] )); } - - // if (_formKey.currentState.validate()) { - // _formKey.currentState.save(); - // BlocProvider.of(context) - // .add(UserWebLogin( - // password: password, - // username: username)); - // } }, ), ), @@ -275,7 +258,6 @@ class _UniT2LoginState extends State { style: mainBtnStyle(third, Colors.transparent, Colors.white38), onPressed: () { - context.goNamed('add-mobile'); }, label: const Text( requestSOS, diff --git a/unit2/lib/screens/unit2/login/qr_login.dart b/unit2/lib/screens/unit2/login/qr_login.dart index 59b9512..9d2f70b 100644 --- a/unit2/lib/screens/unit2/login/qr_login.dart +++ b/unit2/lib/screens/unit2/login/qr_login.dart @@ -7,9 +7,6 @@ import 'package:flutter_form_builder/flutter_form_builder.dart'; import 'package:flutter_progress_hud/flutter_progress_hud.dart'; import 'package:flutter_svg/svg.dart'; import 'package:fluttericon/font_awesome5_icons.dart'; -import 'package:fluttericon/font_awesome_icons.dart'; -import 'package:form_builder_validators/form_builder_validators.dart'; -import 'package:go_router/go_router.dart'; import 'package:unit2/theme-data.dart/btn-style.dart'; import 'package:unit2/widgets/error_state.dart'; import 'package:unit2/widgets/wave.dart'; @@ -159,57 +156,7 @@ class _QRLoginState extends State { const SizedBox( height: 15, ), - // FormBuilderTextField( - // name: 'confirmPassword', - // validator: registerPasswordValidator, - // // initialValue: state.password, - // onChanged: (value) { - // value!.isEmpty - // ? setState(() { - // showSuffixIcon = false; - // }) - // : setState(() { - // showSuffixIcon = true; - // }); - // }, - // autofocus: false, - // style: const TextStyle( - // fontWeight: FontWeight.bold, color: Colors.black87), - // decoration: loginTextFieldStyle().copyWith( - // suffixIcon: Visibility( - // visible: showSuffixIcon, - // child: _showPassword - // ? IconButton( - // icon: Icon(FontAwesome5.eye_slash, - // size: 24, - // color: Theme.of(context) - // .textTheme - // .displayLarge - // ?.color), - // onPressed: () { - // setState(() { - // _showPassword = false; - // }); - // }, - // ) - // : IconButton( - // onPressed: () { - // setState(() { - // _showPassword = true; - // }); - // }, - // icon: Icon(FontAwesome5.eye, - // size: 24, - // color: Theme.of(context) - // .textTheme - // .displayLarge - // ?.color)), - // ), - // prefixIcon: const Icon(Icons.lock), - // labelText: confirmPassword, - // hintText: enterConfirmPassword), - // obscureText: _showPassword ? true : false, - // ), + const SizedBox( height: 15, ), @@ -228,13 +175,7 @@ class _QRLoginState extends State { 'Logging in...', ); context.read().add(UuidLogin(uuid: state.uuid,password: _formKey.currentState!.value['password'])); - // BlocProvider.of(context) - // .add(UserLogin( - // username: _formKey - // .currentState!.value['username'], - // password: _formKey - // .currentState!.value['password'], - // )); + } }, child: const Text(submit)), diff --git a/unit2/pubspec.lock b/unit2/pubspec.lock index 5ec7dd3..f387d29 100644 --- a/unit2/pubspec.lock +++ b/unit2/pubspec.lock @@ -127,13 +127,6 @@ packages: 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" date_time_picker: dependency: "direct main" description: @@ -322,13 +315,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.0.0" - go_router: - dependency: "direct main" - description: - name: go_router - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.1" graphs: dependency: transitive description: @@ -385,13 +371,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.1" - logging: - dependency: transitive - description: - name: logging - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" matcher: dependency: transitive description: diff --git a/unit2/pubspec.yaml b/unit2/pubspec.yaml index fa8c45e..3d40e54 100644 --- a/unit2/pubspec.yaml +++ b/unit2/pubspec.yaml @@ -35,8 +35,6 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: ^1.0.2 - go_router: ^3.0.6 flutter_custom_clippers: ^2.0.0 flutter_svg: ^1.1.6 flutter_form_builder: ^7.7.0