feat: login gmail
This commit is contained in:
@@ -5,9 +5,10 @@ import 'package:cims_apps/application/theme/color_palette.dart';
|
||||
import 'package:cims_apps/core/route/route.dart';
|
||||
import 'package:cims_apps/core/utils/size_config.dart';
|
||||
import 'package:cims_apps/features/auth/login/view/login_view.dart';
|
||||
import 'package:cims_apps/features/auth/registration/view/initial_registration_step.dart';
|
||||
import 'package:cims_apps/features/auth/registration/view/registration_view.dart';
|
||||
import 'package:cims_apps/features/dashboard/dashboard_public/viewmodel/dashboard_public_viewmodel.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class DashboardPublicView extends StatelessWidget {
|
||||
static const routeName = '/DashboardPublicView';
|
||||
@@ -37,88 +38,95 @@ class DashboardPublicView extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
body: SingleChildScrollView(
|
||||
padding: const EdgeInsets.only(
|
||||
top: 32.0,
|
||||
bottom: 8.0,
|
||||
left: 24.0,
|
||||
right: 24.0,
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
ImageView(
|
||||
image: PathAssets.icon1,
|
||||
width: SizeConfig.width * .35,
|
||||
),
|
||||
Align(
|
||||
alignment: Alignment.center,
|
||||
heightFactor: 1,
|
||||
child: _caption()),
|
||||
Align(
|
||||
alignment: Alignment.center,
|
||||
child: ImageView(
|
||||
image: PathAssets.imgDashboard,
|
||||
width: SizeConfig.width * .7,
|
||||
return ChangeNotifierProvider(
|
||||
create: (context) => DashboardPublicViewModel(),
|
||||
builder: (context, child) {
|
||||
return Scaffold(
|
||||
body: SingleChildScrollView(
|
||||
padding: const EdgeInsets.only(
|
||||
top: 32.0,
|
||||
bottom: 8.0,
|
||||
left: 24.0,
|
||||
right: 24.0,
|
||||
),
|
||||
child: Consumer<DashboardPublicViewModel>(
|
||||
builder: (context, provider, child) {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
ImageView(
|
||||
image: PathAssets.icon1,
|
||||
width: SizeConfig.width * .35,
|
||||
),
|
||||
Align(
|
||||
alignment: Alignment.center,
|
||||
heightFactor: 1,
|
||||
child: _caption()),
|
||||
Align(
|
||||
alignment: Alignment.center,
|
||||
child: ImageView(
|
||||
image: PathAssets.imgDashboard,
|
||||
width: SizeConfig.width * .7,
|
||||
),
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
ButtonView(
|
||||
name: 'Sign in',
|
||||
isOutlined: true,
|
||||
width: SizeConfig.width * .43,
|
||||
height: SizeConfig.height * .06,
|
||||
onPressed: () {
|
||||
routePush(context, page: const LoginView());
|
||||
},
|
||||
),
|
||||
ButtonView(
|
||||
name: 'Sign Up',
|
||||
width: SizeConfig.width * .43,
|
||||
height: SizeConfig.height * .06,
|
||||
onPressed: () {
|
||||
routePush(context, page: const RegistrationView());
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
const ImageView(image: PathAssets.iconConnect),
|
||||
ButtonView(
|
||||
name: 'Google',
|
||||
isSecondaryColor: true,
|
||||
isOutlined: true,
|
||||
prefixIcon: const ImageView(
|
||||
image: PathAssets.iconGoogle,
|
||||
width: 26,
|
||||
),
|
||||
onPressed: () {
|
||||
provider.loginGoogle(context);
|
||||
},
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
ImageView(
|
||||
image: PathAssets.iconOjk,
|
||||
width: SizeConfig.width * .20,
|
||||
),
|
||||
ImageView(
|
||||
image: PathAssets.iconInklusi,
|
||||
width: SizeConfig.width * .20,
|
||||
),
|
||||
ImageView(
|
||||
image: PathAssets.iconReksadana,
|
||||
width: SizeConfig.width * .20,
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
);
|
||||
}),
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
ButtonView(
|
||||
name: 'Sign in',
|
||||
isOutlined: true,
|
||||
width: SizeConfig.width * .43,
|
||||
height: SizeConfig.height * .06,
|
||||
onPressed: () {
|
||||
routePush(context, page: const LoginView());
|
||||
},
|
||||
),
|
||||
ButtonView(
|
||||
name: 'Sign Up',
|
||||
width: SizeConfig.width * .43,
|
||||
height: SizeConfig.height * .06,
|
||||
onPressed: () {
|
||||
routePush(context, page: const RegistrationView());
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
const ImageView(image: PathAssets.iconConnect),
|
||||
ButtonView(
|
||||
name: 'Google',
|
||||
isSecondaryColor: true,
|
||||
isOutlined: true,
|
||||
prefixIcon: const ImageView(
|
||||
image: PathAssets.iconGoogle,
|
||||
width: 26,
|
||||
),
|
||||
onPressed: () {
|
||||
routePush(context, page: const InitialRegistrationStep());
|
||||
},
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
ImageView(
|
||||
image: PathAssets.iconOjk,
|
||||
width: SizeConfig.width * .20,
|
||||
),
|
||||
ImageView(
|
||||
image: PathAssets.iconInklusi,
|
||||
width: SizeConfig.width * .20,
|
||||
),
|
||||
ImageView(
|
||||
image: PathAssets.iconReksadana,
|
||||
width: SizeConfig.width * .20,
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user