fix: content padding text field

This commit is contained in:
Prajna Prayoga 2024-02-07 15:54:53 +07:00
parent 9475767021
commit 59e6e82d13
8 changed files with 162 additions and 108 deletions

View File

@ -33,6 +33,7 @@ class TextFormView extends StatelessWidget {
final Color? disabledborderColor;
final bool? enableInteractiveSelection;
final Color? fontColorDisabled;
final EdgeInsets? contentPadding;
final FocusNode? focusNode;
// ignore: prefer_const_constructors_in_immutables
@ -69,6 +70,7 @@ class TextFormView extends StatelessWidget {
this.preffixIconConstraints,
this.disableColor = false,
this.enableInteractiveSelection = true,
this.contentPadding,
this.focusNode,
this.isTextAlignCenter = false,
this.prefix})
@ -193,7 +195,8 @@ class TextFormView extends StatelessWidget {
suffixIconConstraints: suffixIconConstraints,
prefixIconConstraints: preffixIconConstraints,
prefix: prefix,
contentPadding: EdgeInsets.zero),
contentPadding: contentPadding ?? EdgeInsets.zero
),
)
],
);

View File

@ -61,7 +61,7 @@ class _LoginViewState extends State<LoginView> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
ButtonBack(),
const Text('Sign Up'),
const Text('Sign In'),
SizedBox(
width: SizeConfig.width * 0.1,
)
@ -72,6 +72,7 @@ class _LoginViewState extends State<LoginView> {
),
),
body: PageView(
physics: NeverScrollableScrollPhysics(),
controller: pageController,
children: [
PhoneNumberView(nextStep: nextStep, controller: phoneNumberController),
@ -88,7 +89,7 @@ class _LoginViewState extends State<LoginView> {
currentPage++;
pageController.jumpToPage(1);
}else{
routePush(context, page: BottomNavigationView(), routeType: RouteType.pushRemove);
routePush(context, page: BottomNavigationView());
}
}
}

View File

@ -23,7 +23,7 @@ class PasswordView extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const TextTitle(title: 'Enter your phone number', fontSize: 24),
const TextTitle(title: 'Enter your password', fontSize: 24),
SizedBox(
height: 24,
),
@ -31,9 +31,7 @@ class PasswordView extends StatelessWidget {
name: 'Password',
ctrl: controller,
obscureText: !provider.showPassword,
prefix: SizedBox(
width: 16,
),
contentPadding: EdgeInsets.all(12),
suffixIcon: GestureDetector(
onTap: () {
provider.changeShowPassword();

View File

@ -4,7 +4,9 @@ import 'package:cims_apps/application/component/image/image_view.dart';
import 'package:cims_apps/application/component/text_form/text_form_view.dart';
import 'package:cims_apps/application/component/text_title/text_title.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';
import 'package:flutter/services.dart';
@ -92,8 +94,11 @@ class PhoneNumberView extends StatelessWidget {
),
TextButton(
onPressed: () {
routePush(context, page: RegistrationView());
},
style: TextButton.styleFrom(
padding: EdgeInsets.all(0)
),
child: Text(
'Sign Up',
style: TextStyle(

View File

@ -1,10 +1,13 @@
import 'package:carousel_slider/carousel_slider.dart';
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/component/text_title/text_title.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/initial_registration_step.dart';
import 'package:cims_apps/features/auth/registration/view/registration_view.dart';
import 'package:cims_apps/features/dashboard/dashboard_account/view/invest_type/invest_type_view.dart';
import 'package:flutter/material.dart';
@ -47,7 +50,7 @@ class _HomeViewState extends State<HomeView> {
InvestType('Sharia', PathAssets.iconPortofolioSharia)
];
StepVerification listStepVerification = StepVerification(1, [
StepVerification listStepVerification = StepVerification(0, [
'Registration', 'Verification', 'Complete'
]);
@ -268,106 +271,138 @@ class _HomeViewState extends State<HomeView> {
const SizedBox(
height: 24,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
const Row(
children: [
Icon(Icons.verified, size: 18,),
SizedBox(
width: 12,
),
Text(
'Verified by PT Gemilang',
style: TextStyle(
color: ColorPalette.slate500
),
)
],
),
Container(
width: 16,
height: 16,
decoration: BoxDecoration(
color: Colors.white,
border: Border.all(color: const Color(0xffCBD5E1), width: 1.5),
shape: BoxShape.circle
),
)
],
),
const SizedBox(
height: 16,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
const Row(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Icon(Icons.verified, size: 18,),
SizedBox(
width: 12,
),
Text(
'Verified by KSEI',
style: TextStyle(
color: ColorPalette.slate500
),
)
],
),
Container(
width: 16,
height: 16,
decoration: BoxDecoration(
color: Colors.white,
border: Border.all(color: const Color(0xffCBD5E1), width: 1.5),
shape: BoxShape.circle
),
)
],
),
const SizedBox(
height: 16,
),
Container(
padding: const EdgeInsets.all(12),
decoration: BoxDecoration(
color: ColorPalette.blue50,
borderRadius: BorderRadius.circular(12)
),
child: const Column(
if(listStepVerification.currentStep == 1)...[
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'Your registration is currently being verified by PT Gemilang',
style: TextStyle(
color: ColorPalette.slate500
),
),
SizedBox(
height: 16,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
const Row(
children: [
Text('Estimated:',
style: TextStyle(
color: ColorPalette.slate500
),
Icon(Icons.verified, size: 18,),
SizedBox(
width: 12,
),
Text(
'January 30 2024',
'Verified by PT Gemilang',
style: TextStyle(
fontWeight: FontWeight.w600,
color: Color(0xff1E293B)
color: ColorPalette.slate500
),
)
],
),
Container(
width: 16,
height: 16,
decoration: BoxDecoration(
color: Colors.white,
border: Border.all(color: const Color(0xffCBD5E1), width: 1.5),
shape: BoxShape.circle
),
)
],
),
)
const SizedBox(
height: 16,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
const Row(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Icon(Icons.verified, size: 18,),
SizedBox(
width: 12,
),
Text(
'Verified by KSEI',
style: TextStyle(
color: ColorPalette.slate500
),
)
],
),
Container(
width: 16,
height: 16,
decoration: BoxDecoration(
color: Colors.white,
border: Border.all(color: const Color(0xffCBD5E1), width: 1.5),
shape: BoxShape.circle
),
)
],
),
const SizedBox(
height: 16,
),
Container(
padding: const EdgeInsets.all(12),
decoration: BoxDecoration(
color: ColorPalette.blue50,
borderRadius: BorderRadius.circular(12)
),
child: const Column(
children: [
Text(
'Your registration is currently being verified by PT Gemilang',
style: TextStyle(
color: ColorPalette.slate500
),
),
SizedBox(
height: 16,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text('Estimated:',
style: TextStyle(
color: ColorPalette.slate500
),
),
Text(
'January 30 2024',
style: TextStyle(
fontWeight: FontWeight.w600,
color: Color(0xff1E293B)
),
)
],
)
],
),
)
]else if(listStepVerification.currentStep == 0)...[
Container(
padding: const EdgeInsets.all(12),
decoration: BoxDecoration(
color: ColorPalette.blue50,
borderRadius: BorderRadius.circular(12)
),
child: Column(
children: [
Text(
"Let's start registering your data to start mutual fund investment at PT Gemilang Indonesia",
style: TextStyle(
color: ColorPalette.slate500
),
),
SizedBox(
height: 16,
),
ButtonView(
name: 'Registration',
width: SizeConfig.width,
marginVertical: 0,
heightWrapContent: true,
onPressed: () {
routePush(context, page: InitialRegistrationStep());
},
)
],
),
)
]
],
),
);

View File

@ -122,11 +122,20 @@ class _PortofolioViewState extends State<PortofolioView> {
),
const Column(
children: [
Text('Total Mutual Fund'),
Text('Total Mutual Fund',
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 18,
color: ColorPalette.slate400
),
),
Text('10',
style: TextStyle(
fontSize: 44,
fontWeight: FontWeight.w700)),
style: TextStyle(
fontSize: 44,
fontWeight: FontWeight.w700
)
)
,
],
)
]),

View File

@ -99,8 +99,6 @@ class _ProductViewState extends State<ProductView> {
Widget build(BuildContext context) {
return Scaffold(
body: SizedBox(
width: SizeConfig.width,
height: SizeConfig.height,
child: Stack(
children: [
const ImageView(image: PathAssets.imgDashboardAccount),
@ -141,7 +139,8 @@ class _ProductViewState extends State<ProductView> {
],
),
),
bottomNavigationBar: Padding(
bottomNavigationBar: Container(
height: SizeConfig.height * .1,
padding: const EdgeInsets.symmetric(horizontal: 24),
child: ButtonView(
name: 'Buy',
@ -498,6 +497,9 @@ class _ProductViewState extends State<ProductView> {
)
],
),
SizedBox(
height: 16,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
@ -523,7 +525,7 @@ class _ProductViewState extends State<ProductView> {
onPressed: () {
},
prefixIcon: Icon(Icons.space_dashboard_sharp),
prefixIcon: Icon(Icons.calendar_month_rounded),
backgroundColor: ColorPalette.blue50,
sizeBorderRadius: 8,
isSecondaryColor: false,
@ -590,6 +592,8 @@ class _ProductViewState extends State<ProductView> {
TextFormView(
name: '',
ctrl: machineController,
keyboardType: TextInputType.number,
contentPadding: EdgeInsets.all(12),
onChanged: (value) {
value = value.replaceAll('Rp ', '').replaceAll('.', '');
double parseValue = double.parse(value);
@ -600,7 +604,6 @@ class _ProductViewState extends State<ProductView> {
}
setEstimatedValue();
},
keyboardType: TextInputType.number,
),
const Padding(
padding: EdgeInsets.only(top: 16, bottom: 8),

View File

@ -17,7 +17,7 @@ class _SplashScreenState extends State<SplashScreen> {
@override
void initState() {
Future.delayed(const Duration(seconds: 3)).then(
(value) => routePush(context, page: const DashboardPublicView()),
(value) => routePush(context, page: const DashboardPublicView(), routeType: RouteType.pushRemove),
);
super.initState();
}