initial commit
This commit is contained in:
@@ -0,0 +1,207 @@
|
||||
import 'package:cims_apps/application/assets/path_assets.dart';
|
||||
import 'package:cims_apps/application/component/button/button_view.dart';
|
||||
import 'package:cims_apps/application/component/image/image_view.dart';
|
||||
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/registration/view/submission_data/submission_parent.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class InitialRegistrationStep extends StatelessWidget {
|
||||
static const routeName = '/InitialRegistrationStep';
|
||||
const InitialRegistrationStep({Key? key}) : super(key: key);
|
||||
|
||||
Widget _stepItem({
|
||||
required String description,
|
||||
bool isActive = false,
|
||||
bool isDone = false,
|
||||
bool isLast = false,
|
||||
}) {
|
||||
return Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
height: 30,
|
||||
width: 30,
|
||||
decoration: BoxDecoration(
|
||||
color: isDone ? ColorPalette.primary : Colors.white,
|
||||
border: Border.all(
|
||||
width: 2.0,
|
||||
color: isActive || isDone
|
||||
? ColorPalette.primary
|
||||
: Colors.grey),
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
child: isDone
|
||||
? const Align(
|
||||
alignment: Alignment.center,
|
||||
child: Icon(
|
||||
Icons.done_outlined,
|
||||
color: Colors.white,
|
||||
),
|
||||
)
|
||||
: const SizedBox(),
|
||||
),
|
||||
if (!isLast)
|
||||
ConstrainedBox(
|
||||
constraints: BoxConstraints.expand(
|
||||
width: 0.0, height: SizeConfig.width * .07),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 4.0),
|
||||
child: VerticalDivider(
|
||||
color: isDone ? ColorPalette.primary : Colors.grey,
|
||||
thickness: 2.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(
|
||||
width: 8.0,
|
||||
),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const SizedBox(
|
||||
height: 8.0,
|
||||
),
|
||||
Text(
|
||||
description,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w600,
|
||||
color:
|
||||
isActive ? ColorPalette.primary : ColorPalette.slate800,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
List listStep = [
|
||||
{
|
||||
'desc': 'Personal Data',
|
||||
'isActive': true,
|
||||
'isDone': true,
|
||||
'isLast': false,
|
||||
},
|
||||
{
|
||||
'desc': 'Email',
|
||||
'isActive': true,
|
||||
'isDone': false,
|
||||
'isLast': false,
|
||||
},
|
||||
{
|
||||
'desc': 'Identity Card Photo ',
|
||||
'isActive': false,
|
||||
'isDone': false,
|
||||
'isLast': false,
|
||||
},
|
||||
{
|
||||
'desc': 'Identity Card Photo ',
|
||||
'isActive': false,
|
||||
'isDone': false,
|
||||
'isLast': false,
|
||||
},
|
||||
{
|
||||
'desc': 'ID Card Data Accuracy',
|
||||
'isActive': false,
|
||||
'isDone': false,
|
||||
'isLast': false,
|
||||
},
|
||||
{
|
||||
'desc': 'Bank Data',
|
||||
'isActive': false,
|
||||
'isDone': false,
|
||||
'isLast': false,
|
||||
},
|
||||
{
|
||||
'desc': 'Digital Signature',
|
||||
'isActive': false,
|
||||
'isDone': false,
|
||||
'isLast': false,
|
||||
},
|
||||
{
|
||||
'desc': 'Know your Risk Profile',
|
||||
'isActive': false,
|
||||
'isDone': false,
|
||||
'isLast': false,
|
||||
},
|
||||
{
|
||||
'desc': 'Completed Registration',
|
||||
'isActive': false,
|
||||
'isDone': false,
|
||||
'isLast': true,
|
||||
},
|
||||
];
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('Registration'),
|
||||
),
|
||||
body: Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24.0),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
ImageView(
|
||||
image: PathAssets.imgRegis,
|
||||
width: SizeConfig.width * .4,
|
||||
),
|
||||
SizedBox(
|
||||
width: SizeConfig.width * .45,
|
||||
child: const Text(
|
||||
"It's time for your registration",
|
||||
maxLines: 2,
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w700,
|
||||
fontSize: 18,
|
||||
color: ColorPalette.slate800),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: SizeConfig.height * .6,
|
||||
child: SingleChildScrollView(
|
||||
scrollDirection: Axis.vertical,
|
||||
child: Column(
|
||||
children: listStep
|
||||
.asMap()
|
||||
.entries
|
||||
.map((e) => _stepItem(
|
||||
description: '${e.value['desc']}',
|
||||
isActive: e.value['isActive'],
|
||||
isDone: e.value['isDone'],
|
||||
isLast: e.value['isLast'],
|
||||
))
|
||||
.toList(),
|
||||
),
|
||||
),
|
||||
),
|
||||
ButtonView(
|
||||
name: 'Let’s Start',
|
||||
marginVertical: 8.0,
|
||||
onPressed: () {
|
||||
routePush(context, page: const SubmissionParent());
|
||||
},
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
66
lib/features/auth/registration/view/registration_view.dart
Normal file
66
lib/features/auth/registration/view/registration_view.dart
Normal file
@@ -0,0 +1,66 @@
|
||||
import 'package:cims_apps/application/component/button/button_view.dart';
|
||||
import 'package:cims_apps/application/component/text_caption/text_caption.dart';
|
||||
import 'package:cims_apps/application/component/text_form/text_form_view.dart';
|
||||
import 'package:cims_apps/core/route/route.dart';
|
||||
import 'package:cims_apps/features/auth/registration/view/initial_registration_step.dart';
|
||||
import 'package:cims_apps/features/bottom_navigation_view.dart';
|
||||
import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class RegistrationView extends StatelessWidget {
|
||||
static const routName = '/RegistrationView';
|
||||
const RegistrationView({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('Sign Up'),
|
||||
),
|
||||
body: Container(
|
||||
padding: const EdgeInsets.all(24.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const TextCaption(
|
||||
title: 'Enter your phone number',
|
||||
subtitle: 'Input your registered phone number',
|
||||
),
|
||||
TextFormView(name: 'Phone Number'),
|
||||
ButtonView(
|
||||
name: 'Next',
|
||||
onPressed: () {
|
||||
routePush(context, page: const InitialRegistrationStep());
|
||||
},
|
||||
),
|
||||
Align(
|
||||
alignment: Alignment.center,
|
||||
child: RichText(
|
||||
textAlign: TextAlign.center,
|
||||
text: TextSpan(children: [
|
||||
const TextSpan(
|
||||
text: 'Already have an account? ',
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
decoration: TextDecoration.underline,
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
recognizer: TapGestureRecognizer()
|
||||
..onTap = () {
|
||||
print('object');
|
||||
},
|
||||
text: ' Sign In',
|
||||
style: const TextStyle(
|
||||
color: Colors.blue,
|
||||
),
|
||||
),
|
||||
]),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
import 'package:cims_apps/application/component/button/button_view.dart';
|
||||
import 'package:cims_apps/application/theme/color_palette.dart';
|
||||
import 'package:cims_apps/core/utils/size_config.dart';
|
||||
import 'package:cims_apps/features/auth/registration/view/submission_data/submit_email.dart';
|
||||
import 'package:cims_apps/features/auth/registration/view/submission_data/submit_personal_data.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class SubmissionParent extends StatefulWidget {
|
||||
static const routeName = '/SubmissionParent';
|
||||
const SubmissionParent({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<SubmissionParent> createState() => _SubmissionParentState();
|
||||
}
|
||||
|
||||
class _SubmissionParentState extends State<SubmissionParent> {
|
||||
int _currentStep = 1;
|
||||
final int _stepAmount = 9;
|
||||
Widget _stepItem({bool isCurrentStep = false, bool isDone = false}) {
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
if (_currentStep > 1) {
|
||||
_currentStep--;
|
||||
} else if (_currentStep == 1) {
|
||||
_currentStep++;
|
||||
}
|
||||
});
|
||||
},
|
||||
child: Container(
|
||||
margin: const EdgeInsets.only(right: 4.0, left: 4.0),
|
||||
height: 6,
|
||||
width: SizeConfig.width * .08,
|
||||
decoration: BoxDecoration(
|
||||
color: isCurrentStep || isDone
|
||||
? ColorPalette.primary
|
||||
: ColorPalette.greyBorderNeutrals,
|
||||
borderRadius: BorderRadius.circular(50),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
_content(int index) {
|
||||
switch (index) {
|
||||
case 1:
|
||||
return const SubmitPersonalData();
|
||||
case 2:
|
||||
return const SubmitEmail();
|
||||
case 3:
|
||||
return Container(
|
||||
child: Text("Step 3"),
|
||||
);
|
||||
case 4:
|
||||
return Container(
|
||||
child: Text("Step 4"),
|
||||
);
|
||||
case 5:
|
||||
return Container(
|
||||
child: Text("Step 5"),
|
||||
);
|
||||
case 6:
|
||||
return Container(
|
||||
child: Text("Step 6"),
|
||||
);
|
||||
case 7:
|
||||
return Container(
|
||||
child: Text("Step 7"),
|
||||
);
|
||||
case 8:
|
||||
return Container(
|
||||
child: Text("Step 8"),
|
||||
);
|
||||
case 9:
|
||||
return Container(
|
||||
child: Text("Step 9"),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('Registration'),
|
||||
),
|
||||
body: Stack(
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 16.0, vertical: 16.0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: List.generate(
|
||||
_stepAmount,
|
||||
(index) => _stepItem(
|
||||
isCurrentStep: _currentStep == index + 1,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||
child: _content(_currentStep),
|
||||
)
|
||||
],
|
||||
),
|
||||
Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: ButtonView(
|
||||
name: 'Next',
|
||||
marginVertical: 16.0,
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
_currentStep++;
|
||||
});
|
||||
},
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import 'package:cims_apps/application/component/text_caption/text_caption.dart';
|
||||
import 'package:cims_apps/application/component/text_form/text_form_view.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class SubmitEmail extends StatelessWidget {
|
||||
const SubmitEmail({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const TextCaption(title: 'Enter your e-mail'),
|
||||
TextFormView(
|
||||
name: 'E-mail Address',
|
||||
hintText: 'Input e-mail address',
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import 'package:cims_apps/application/component/text_caption/text_caption.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class SubmitPersonalData extends StatelessWidget {
|
||||
const SubmitPersonalData({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
TextCaption(title: 'Your personal details'),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
71
lib/features/bottom_navigation_view.dart
Normal file
71
lib/features/bottom_navigation_view.dart
Normal file
@@ -0,0 +1,71 @@
|
||||
import 'package:cims_apps/application/theme/color_palette.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class BottomNavigationView extends StatefulWidget {
|
||||
const BottomNavigationView({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<BottomNavigationView> createState() => _BottomNavigationViewState();
|
||||
}
|
||||
|
||||
class _BottomNavigationViewState extends State<BottomNavigationView> {
|
||||
int _selectedIndex = 0;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
///TODO: masukan pagenya dilistWidget ini
|
||||
List<Widget> listWidget = [
|
||||
Container(
|
||||
color: Colors.amberAccent,
|
||||
),
|
||||
Container(
|
||||
color: Colors.redAccent,
|
||||
),
|
||||
Container(),
|
||||
Container(),
|
||||
Container(),
|
||||
Container(),
|
||||
];
|
||||
|
||||
List<BottomNavigationBarItem> listNavigation = const [
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(Icons.home_outlined),
|
||||
label: 'Home',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(Icons.search),
|
||||
label: 'Search',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(Icons.compare_arrows),
|
||||
label: 'Transaction',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(Icons.pie_chart_rounded),
|
||||
label: 'Portfolio',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(Icons.person),
|
||||
label: 'Profile',
|
||||
),
|
||||
];
|
||||
|
||||
return Scaffold(
|
||||
body: listWidget[_selectedIndex],
|
||||
bottomNavigationBar: BottomNavigationBar(
|
||||
onTap: (value) {
|
||||
setState(() {
|
||||
_selectedIndex = value;
|
||||
});
|
||||
},
|
||||
currentIndex: _selectedIndex,
|
||||
items: listNavigation,
|
||||
showUnselectedLabels: true,
|
||||
selectedItemColor: ColorPalette.primary,
|
||||
unselectedItemColor: Colors.black,
|
||||
selectedLabelStyle: const TextStyle(color: ColorPalette.primary),
|
||||
unselectedLabelStyle: const TextStyle(color: Colors.black),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
import 'package:cims_apps/application/assets/path_assets.dart';
|
||||
import 'package:cims_apps/application/component/button/button_view.dart';
|
||||
import 'package:cims_apps/application/component/image/image_view.dart';
|
||||
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/registration/view/registration_view.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class DashboardPublicView extends StatelessWidget {
|
||||
static const routeName = '/DashboardPublicView';
|
||||
const DashboardPublicView({Key? key}) : super(key: key);
|
||||
|
||||
Widget _caption() {
|
||||
return Column(
|
||||
children: [
|
||||
const Text(
|
||||
'Welcome!',
|
||||
style: TextStyle(
|
||||
color: ColorPalette.primary,
|
||||
fontWeight: FontWeight.w700,
|
||||
fontSize: 28),
|
||||
),
|
||||
SizedBox(
|
||||
width: SizeConfig.width * .8,
|
||||
child: const Text(
|
||||
'We serve the management of Third Party investment funds in fulfilling financial goals.',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(color: ColorPalette.greyFont),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
body: Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 32.0,
|
||||
horizontal: 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,
|
||||
),
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
ButtonView(
|
||||
name: 'Sign in',
|
||||
isOutlined: true,
|
||||
width: SizeConfig.width * .43,
|
||||
height: SizeConfig.height * .06,
|
||||
onPressed: () {},
|
||||
),
|
||||
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: () {},
|
||||
),
|
||||
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,
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
55
lib/features/splash_screen.dart
Normal file
55
lib/features/splash_screen.dart
Normal file
@@ -0,0 +1,55 @@
|
||||
import 'package:cims_apps/application/assets/path_assets.dart';
|
||||
import 'package:cims_apps/application/component/image/image_view.dart';
|
||||
import 'package:cims_apps/core/route/route.dart';
|
||||
import 'package:cims_apps/core/utils/size_config.dart';
|
||||
import 'package:cims_apps/features/dashboard/dashboard_public/view/dashboard_public_view.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class SplashScreen extends StatefulWidget {
|
||||
static const routeName = '/SplashScreen';
|
||||
const SplashScreen({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<SplashScreen> createState() => _SplashScreenState();
|
||||
}
|
||||
|
||||
class _SplashScreenState extends State<SplashScreen> {
|
||||
@override
|
||||
void initState() {
|
||||
Future.delayed(const Duration(seconds: 3)).then(
|
||||
(value) => routePush(context, page: const DashboardPublicView()),
|
||||
);
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final color = Theme.of(context).colorScheme;
|
||||
|
||||
return Scaffold(
|
||||
backgroundColor: color.primary,
|
||||
body: Stack(
|
||||
children: [
|
||||
Align(
|
||||
alignment: Alignment.topRight,
|
||||
child: ImageView(
|
||||
image: PathAssets.iconSplashRight,
|
||||
width: SizeConfig.width * .25,
|
||||
)),
|
||||
Center(
|
||||
child: ImageView(
|
||||
image: PathAssets.imgSplashLogo,
|
||||
width: SizeConfig.width * .6,
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: Alignment.bottomLeft,
|
||||
child: ImageView(
|
||||
image: PathAssets.iconSplashLeft,
|
||||
width: SizeConfig.width * .25,
|
||||
)),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user