Skip to content

Commit

Permalink
refactor: updating tolatest stable version
Browse files Browse the repository at this point in the history
  • Loading branch information
Emon526 committed Feb 1, 2024
1 parent 6d7286f commit ba0bb7c
Show file tree
Hide file tree
Showing 14 changed files with 258 additions and 237 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ android {
noCompress 'lite'
}

compileSdkVersion 33
compileSdkVersion 34
ndkVersion flutter.ndkVersion

compileOptions {
Expand All @@ -58,7 +58,7 @@ android {
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
minSdkVersion 19
targetSdkVersion 33
targetSdkVersion 34
multiDexEnabled true
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
Expand Down
2 changes: 1 addition & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class MyApp extends StatelessWidget {
create: (_) => LanguageProvider(),
),
ChangeNotifierProvider(
create: (_) => AuthProvider(),
create: (_) => AuthrizationProviders(),
),
ChangeNotifierProvider(
create: (_) => NavBarProvider(),
Expand Down
5 changes: 3 additions & 2 deletions lib/providers/authprovider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ import 'package:shared_preferences/shared_preferences.dart';

import '../models/usermodel.dart';

class AuthProvider extends ChangeNotifier {
AuthProvider() {
class AuthrizationProviders extends ChangeNotifier {
AuthrizationProviders() {
getrememberme();
fatchsaverememberme();
}

final emailController = TextEditingController();
final passController = TextEditingController();
final auth = FirebaseAuth.instance;
Expand Down
4 changes: 2 additions & 2 deletions lib/screens/auth/auth.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import '../../widget/persistent_nav_bar.dart';
import 'login.dart';

class Auth extends StatelessWidget {
const Auth({Key? key}) : super(key: key);
const Auth({super.key});

@override
Widget build(BuildContext context) {
return Consumer<AuthProvider>(
return Consumer<AuthrizationProviders>(
builder: (context, value, child) {
return StreamBuilder<User?>(
stream: value.auth.userChanges(),
Expand Down
2 changes: 1 addition & 1 deletion lib/screens/auth/forgotpassword.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class _ForgotPasswordState extends State<ForgotPassword> {
),
),
),
body: Consumer<AuthProvider>(
body: Consumer<AuthrizationProviders>(
builder: (context, authprovider, child) {
return SingleChildScrollView(
child: SafeArea(
Expand Down
2 changes: 1 addition & 1 deletion lib/screens/auth/login.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class _LoginScreenState extends State<LoginScreen> {
},
child: Scaffold(
resizeToAvoidBottomInset: true,
body: Consumer<AuthProvider>(
body: Consumer<AuthrizationProviders>(
builder: (context, authprovider, child) {
return SingleChildScrollView(
child: SafeArea(
Expand Down
2 changes: 1 addition & 1 deletion lib/screens/auth/signup.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class _SignupState extends State<Signup> {

return Scaffold(
resizeToAvoidBottomInset: true,
body: Consumer<AuthProvider>(
body: Consumer<AuthrizationProviders>(
builder: (context, authprovider, child) {
return SingleChildScrollView(
child: SafeArea(
Expand Down
2 changes: 1 addition & 1 deletion lib/screens/onboarding/introduction.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import '../../providers/languageprovider.dart';
import '../auth/auth.dart';

class IntroductionPage extends StatefulWidget {
const IntroductionPage({Key? key}) : super(key: key);
const IntroductionPage({super.key});

@override
IntroductionPageState createState() => IntroductionPageState();
Expand Down
2 changes: 1 addition & 1 deletion lib/screens/settings/settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ class SettingScreen extends StatelessWidget {
// Show circular indicator while deleting credentials
Utils(context).customLoading();
try {
await context.read<AuthProvider>().delete();
await context.read<AuthrizationProviders>().delete();
} on FirebaseAuthException catch (e) {
ResponsiveSnackbar.show(context, e.message!);
}
Expand Down
4 changes: 2 additions & 2 deletions lib/widget/drawer_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class DrawerWidget extends StatelessWidget {
child: SafeArea(
child: Column(
children: [
Consumer<AuthProvider>(
Consumer<AuthrizationProviders>(
builder: (context, value, child) {
return StreamBuilder<UserModel?>(
stream: value.getUserData(),
Expand Down Expand Up @@ -102,7 +102,7 @@ class DrawerWidget extends StatelessWidget {
tiletitle: AppLocalizations.of(context)!.logoutbutton,
iconData: Icons.logout,
onTap: () async {
await context.read<AuthProvider>().logout();
await context.read<AuthrizationProviders>().logout();
},
),
],
Expand Down
Loading

0 comments on commit ba0bb7c

Please sign in to comment.