changed imports of AppLocalization
Also added beneficiary validation while quick pay within bank
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import '../../../l10n/app_localizations.dart';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
@@ -48,9 +48,9 @@ class LoginScreenState extends State<LoginScreen>
|
||||
void _submitForm() {
|
||||
if (_formKey.currentState!.validate()) {
|
||||
context.read<AuthCubit>().login(
|
||||
_customerNumberController.text.trim(),
|
||||
_passwordController.text,
|
||||
);
|
||||
_customerNumberController.text.trim(),
|
||||
_passwordController.text,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,10 +69,13 @@ class LoginScreenState extends State<LoginScreen>
|
||||
builder: (_) => MPinScreen(
|
||||
mode: MPinMode.set,
|
||||
onCompleted: (_) {
|
||||
Navigator.of(context, rootNavigator: true)
|
||||
.pushReplacement(
|
||||
Navigator.of(
|
||||
context,
|
||||
rootNavigator: true,
|
||||
).pushReplacement(
|
||||
MaterialPageRoute(
|
||||
builder: (_) => const NavigationScaffold()),
|
||||
builder: (_) => const NavigationScaffold(),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
@@ -84,9 +87,9 @@ class LoginScreenState extends State<LoginScreen>
|
||||
);
|
||||
}
|
||||
} else if (state is AuthError) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(content: Text(state.message)),
|
||||
);
|
||||
ScaffoldMessenger.of(
|
||||
context,
|
||||
).showSnackBar(SnackBar(content: Text(state.message)));
|
||||
}
|
||||
},
|
||||
builder: (context, state) {
|
||||
@@ -97,7 +100,7 @@ class LoginScreenState extends State<LoginScreen>
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
// 🔁 Animated Blinking Logo
|
||||
// 🔁 Animated Blinking Logo
|
||||
FadeTransition(
|
||||
opacity: _logoAnimation,
|
||||
child: Image.asset(
|
||||
@@ -105,8 +108,11 @@ class LoginScreenState extends State<LoginScreen>
|
||||
width: 150,
|
||||
height: 150,
|
||||
errorBuilder: (context, error, stackTrace) {
|
||||
return const Icon(Icons.account_balance,
|
||||
size: 100, color: Colors.blue);
|
||||
return const Icon(
|
||||
Icons.account_balance,
|
||||
size: 100,
|
||||
color: Colors.blue,
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
@@ -115,9 +121,10 @@ class LoginScreenState extends State<LoginScreen>
|
||||
Text(
|
||||
AppLocalizations.of(context).kccb,
|
||||
style: TextStyle(
|
||||
fontSize: 32,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.blue),
|
||||
fontSize: 32,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.blue,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 48),
|
||||
|
||||
@@ -147,7 +154,7 @@ class LoginScreenState extends State<LoginScreen>
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
// Password
|
||||
// Password
|
||||
TextFormField(
|
||||
controller: _passwordController,
|
||||
obscureText: _obscurePassword,
|
||||
@@ -233,10 +240,11 @@ class LoginScreenState extends State<LoginScreen>
|
||||
//disable until registration is implemented
|
||||
onPressed: null,
|
||||
style: OutlinedButton.styleFrom(
|
||||
shape: const StadiumBorder(),
|
||||
padding: const EdgeInsets.symmetric(vertical: 16),
|
||||
backgroundColor: Colors.lightBlue[100],
|
||||
foregroundColor: Colors.black),
|
||||
shape: const StadiumBorder(),
|
||||
padding: const EdgeInsets.symmetric(vertical: 16),
|
||||
backgroundColor: Colors.lightBlue[100],
|
||||
foregroundColor: Colors.black,
|
||||
),
|
||||
child: Text(AppLocalizations.of(context).register),
|
||||
),
|
||||
),
|
||||
@@ -250,7 +258,6 @@ class LoginScreenState extends State<LoginScreen>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:kmobile/di/injection.dart';
|
||||
|
Reference in New Issue
Block a user