Fixed size on web and changed details design button in desktop and tablet
This commit is contained in:
@@ -13,6 +13,8 @@ class TenderDetailDesktopPage extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
SizeConfig.init(context);
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: AppColors.backgroundColor,
|
backgroundColor: AppColors.backgroundColor,
|
||||||
appBar: _buildAppBar(context),
|
appBar: _buildAppBar(context),
|
||||||
@@ -25,11 +27,11 @@ class TenderDetailDesktopPage extends StatelessWidget {
|
|||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
TenderDetailHeader(isBig: true),
|
TenderDetailHeader(isScreenBig: true),
|
||||||
SizedBox(height: 24.0.h()),
|
SizedBox(height: 24.0.h()),
|
||||||
const TenderDetailCard(),
|
const TenderDetailCard(),
|
||||||
SizedBox(height: 24.0.h()),
|
SizedBox(height: 24.0.h()),
|
||||||
TenderDetailActions(),
|
TenderDetailActions(isScreenBig: true),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -22,11 +22,11 @@ class TenderDetailMobilePage extends StatelessWidget {
|
|||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
TenderDetailHeader(isBig: false),
|
TenderDetailHeader(isScreenBig: false),
|
||||||
SizedBox(height: 24.0.h()),
|
SizedBox(height: 24.0.h()),
|
||||||
const TenderDetailCard(),
|
const TenderDetailCard(),
|
||||||
SizedBox(height: 24.0.h()),
|
SizedBox(height: 24.0.h()),
|
||||||
TenderDetailActions(),
|
TenderDetailActions(isScreenBig: false,),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -38,7 +38,7 @@ class TenderDetailMobilePage extends StatelessWidget {
|
|||||||
return PreferredSize(
|
return PreferredSize(
|
||||||
preferredSize: const Size.fromHeight(60),
|
preferredSize: const Size.fromHeight(60),
|
||||||
child: AppBar(
|
child: AppBar(
|
||||||
backgroundColor: AppColors.backgroundColor,
|
backgroundColor: AppColors.backgroundColor,
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
titleSpacing: 0,
|
titleSpacing: 0,
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
|
|||||||
@@ -25,11 +25,11 @@ class TenderDetailTabletPage extends StatelessWidget {
|
|||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
TenderDetailHeader(isBig: true),
|
TenderDetailHeader(isScreenBig: true),
|
||||||
SizedBox(height: 24.0.h()),
|
SizedBox(height: 24.0.h()),
|
||||||
const TenderDetailCard(),
|
const TenderDetailCard(),
|
||||||
SizedBox(height: 24.0.h()),
|
SizedBox(height: 24.0.h()),
|
||||||
TenderDetailActions(),
|
TenderDetailActions(isScreenBig: true,),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -43,7 +43,7 @@ class TenderDetailTabletPage extends StatelessWidget {
|
|||||||
return PreferredSize(
|
return PreferredSize(
|
||||||
preferredSize: const Size.fromHeight(60),
|
preferredSize: const Size.fromHeight(60),
|
||||||
child: AppBar(
|
child: AppBar(
|
||||||
backgroundColor: AppColors.backgroundColor,
|
backgroundColor: AppColors.backgroundColor,
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
titleSpacing: 0,
|
titleSpacing: 0,
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
|
|||||||
@@ -8,156 +8,164 @@ class DeadlineItem extends StatelessWidget {
|
|||||||
final String approvalDate;
|
final String approvalDate;
|
||||||
final String submissionText;
|
final String submissionText;
|
||||||
final String submissionDate;
|
final String submissionDate;
|
||||||
final bool isBig;
|
final bool isScreenBig;
|
||||||
|
|
||||||
const DeadlineItem({
|
const DeadlineItem({
|
||||||
required this.title, required this.approvalText, required this.approvalDate, required this.submissionText, required this.submissionDate, required this.isBig, super.key,
|
required this.title,
|
||||||
|
required this.approvalText,
|
||||||
|
required this.approvalDate,
|
||||||
|
required this.submissionText,
|
||||||
|
required this.submissionDate,
|
||||||
|
required this.isScreenBig,
|
||||||
|
super.key,
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return isBig ? Padding(
|
return isScreenBig
|
||||||
padding: EdgeInsets.symmetric(vertical: 0),
|
? Padding(
|
||||||
child: Column(
|
padding: EdgeInsets.symmetric(vertical: 0),
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
child: Column(
|
||||||
children: [
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
SizedBox(
|
children: [
|
||||||
height: 45.0.h(),
|
SizedBox(
|
||||||
child: Text(
|
height: 45.0.h(),
|
||||||
title,
|
child: Text(
|
||||||
style: TextStyle(
|
title,
|
||||||
color: AppColors.grey80,
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.w600,
|
color: AppColors.grey80,
|
||||||
fontSize: 16.0.sp(),
|
fontWeight: FontWeight.w600,
|
||||||
),
|
fontSize: 16.0.sp(),
|
||||||
),
|
|
||||||
),
|
|
||||||
IntrinsicHeight(
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
approvalText,
|
|
||||||
style: TextStyle(
|
|
||||||
color: AppColors.grey70,
|
|
||||||
fontWeight: FontWeight.w400,
|
|
||||||
fontSize: 14.0.sp(),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(height: 4.0.h()),
|
|
||||||
Text(
|
|
||||||
approvalDate,
|
|
||||||
style: TextStyle(
|
|
||||||
color: AppColors.grey80,
|
|
||||||
fontWeight: FontWeight.w400,
|
|
||||||
fontSize: 14.0.sp(),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
VerticalDivider(
|
),
|
||||||
color: AppColors.grey30,
|
IntrinsicHeight(
|
||||||
thickness: 1,
|
child: Row(
|
||||||
width: 24,
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
approvalText,
|
||||||
|
style: TextStyle(
|
||||||
|
color: AppColors.grey70,
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
fontSize: 14.0.sp(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: 4.0.h()),
|
||||||
|
Text(
|
||||||
|
approvalDate,
|
||||||
|
style: TextStyle(
|
||||||
|
color: AppColors.grey80,
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
fontSize: 14.0.sp(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
VerticalDivider(
|
||||||
|
color: AppColors.grey30,
|
||||||
|
thickness: 1,
|
||||||
|
width: 24,
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
submissionText,
|
||||||
|
style: TextStyle(
|
||||||
|
color: AppColors.grey70,
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
fontSize: 14.0.sp(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: 4.0.h()),
|
||||||
|
Text(
|
||||||
|
submissionDate,
|
||||||
|
style: TextStyle(
|
||||||
|
color: AppColors.grey80,
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
fontSize: 14.0.sp(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
Expanded(
|
),
|
||||||
child: Column(
|
SizedBox(height: 8.0.h()),
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
const Divider(),
|
||||||
children: [
|
],
|
||||||
Text(
|
),
|
||||||
submissionText,
|
)
|
||||||
style: TextStyle(
|
: Padding(
|
||||||
color: AppColors.grey70,
|
padding: EdgeInsets.symmetric(vertical: 0),
|
||||||
fontWeight: FontWeight.w400,
|
child: Column(
|
||||||
fontSize: 14.0.sp(),
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
),
|
children: [
|
||||||
),
|
SizedBox(
|
||||||
SizedBox(height: 4.0.h()),
|
height: 45.0.h(),
|
||||||
Text(
|
child: Text(
|
||||||
submissionDate,
|
title,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: AppColors.grey80,
|
color: AppColors.grey80,
|
||||||
fontWeight: FontWeight.w400,
|
fontWeight: FontWeight.w600,
|
||||||
fontSize: 14.0.sp(),
|
fontSize: 16.0.sp(),
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(height: 8.0.h()),
|
|
||||||
const Divider(),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
) : Padding(
|
|
||||||
padding: EdgeInsets.symmetric(vertical: 0),
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
SizedBox(
|
|
||||||
height: 45.0.h(),
|
|
||||||
child: Text(
|
|
||||||
title,
|
|
||||||
style: TextStyle(
|
|
||||||
color: AppColors.grey80,
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
fontSize: 16.0.sp(),
|
|
||||||
),
|
),
|
||||||
),
|
Row(
|
||||||
),
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
Row(
|
children: [
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
Text(
|
||||||
children: [
|
approvalText,
|
||||||
Text(
|
style: TextStyle(
|
||||||
approvalText,
|
color: AppColors.grey70,
|
||||||
style: TextStyle(
|
fontWeight: FontWeight.w400,
|
||||||
color: AppColors.grey70,
|
fontSize: 14.0.sp(),
|
||||||
fontWeight: FontWeight.w400,
|
),
|
||||||
fontSize: 14.0.sp(),
|
),
|
||||||
),
|
Text(
|
||||||
|
approvalDate,
|
||||||
|
style: TextStyle(
|
||||||
|
color: AppColors.grey70,
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
fontSize: 14.0.sp(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
Text(
|
SizedBox(height: 4.0.h()),
|
||||||
approvalDate,
|
Row(
|
||||||
style: TextStyle(
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
color: AppColors.grey70,
|
children: [
|
||||||
fontWeight: FontWeight.w400,
|
Text(
|
||||||
fontSize: 14.0.sp(),
|
submissionText,
|
||||||
),
|
style: TextStyle(
|
||||||
|
color: AppColors.grey70,
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
fontSize: 14.0.sp(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
submissionDate,
|
||||||
|
style: TextStyle(
|
||||||
|
color: AppColors.grey70,
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
fontSize: 14.0.sp(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
|
SizedBox(height: 8.0.h()),
|
||||||
|
const Divider(),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
SizedBox(height: 4.0.h()),
|
);
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
submissionText,
|
|
||||||
style: TextStyle(
|
|
||||||
color: AppColors.grey70,
|
|
||||||
fontWeight: FontWeight.w400,
|
|
||||||
fontSize: 14.0.sp(),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
submissionDate,
|
|
||||||
style: TextStyle(
|
|
||||||
color: AppColors.grey70,
|
|
||||||
fontWeight: FontWeight.w400,
|
|
||||||
fontSize: 14.0.sp(),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(height: 8.0.h()),
|
|
||||||
const Divider(),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,31 +5,56 @@ import 'package:tm_app/core/utils/size_config.dart';
|
|||||||
import 'package:tm_app/views/login/widgets/login_button.dart';
|
import 'package:tm_app/views/login/widgets/login_button.dart';
|
||||||
|
|
||||||
class TenderDetailActions extends StatelessWidget {
|
class TenderDetailActions extends StatelessWidget {
|
||||||
const TenderDetailActions({super.key});
|
final bool isScreenBig;
|
||||||
|
const TenderDetailActions({required this.isScreenBig, super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Column(
|
return isScreenBig
|
||||||
children: [
|
? Row(
|
||||||
BaseButton(
|
children: [
|
||||||
isEnabled: true,
|
Spacer(),
|
||||||
text: AppStrings.tenderSubmitButton,
|
BaseButton(
|
||||||
backgroundColor: AppColors.lightBlue,
|
isEnabled: true,
|
||||||
textColor: AppColors.mainBlue,
|
text: AppStrings.tenderRejectButton,
|
||||||
onPressed: () {},
|
textColor: AppColors.red10,
|
||||||
),
|
backgroundColor: AppColors.backgroundColor,
|
||||||
SizedBox(height: 16.0.h()),
|
borderWidth: 1,
|
||||||
BaseButton(
|
onPressed: () {},
|
||||||
isEnabled: true,
|
width: 120.0.w(),
|
||||||
text: AppStrings.tenderRejectButton,
|
),
|
||||||
borderColor: AppColors.red10,
|
SizedBox(width: 5.0.w()),
|
||||||
textColor: AppColors.red10,
|
BaseButton(
|
||||||
backgroundColor: AppColors.backgroundColor,
|
isEnabled: true,
|
||||||
borderWidth: 1,
|
text: AppStrings.tenderSubmitButton,
|
||||||
onPressed: () {},
|
backgroundColor: AppColors.lightBlue,
|
||||||
),
|
textColor: AppColors.mainBlue,
|
||||||
SizedBox(height: 16.0.h()),
|
onPressed: () {},
|
||||||
],
|
width: 120.0.w(),
|
||||||
);
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
: Column(
|
||||||
|
children: [
|
||||||
|
BaseButton(
|
||||||
|
isEnabled: true,
|
||||||
|
text: AppStrings.tenderSubmitButton,
|
||||||
|
backgroundColor: AppColors.lightBlue,
|
||||||
|
textColor: AppColors.mainBlue,
|
||||||
|
onPressed: () {},
|
||||||
|
),
|
||||||
|
SizedBox(height: 16.0.h()),
|
||||||
|
BaseButton(
|
||||||
|
isEnabled: true,
|
||||||
|
text: AppStrings.tenderRejectButton,
|
||||||
|
borderColor: AppColors.red10,
|
||||||
|
textColor: AppColors.red10,
|
||||||
|
backgroundColor: AppColors.backgroundColor,
|
||||||
|
borderWidth: 1,
|
||||||
|
onPressed: () {},
|
||||||
|
),
|
||||||
|
SizedBox(height: 16.0.h()),
|
||||||
|
],
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ import 'package:tm_app/views/detail/widgets/tender_document_section.dart';
|
|||||||
import 'package:tm_app/views/detail/widgets/tender_location_section.dart';
|
import 'package:tm_app/views/detail/widgets/tender_location_section.dart';
|
||||||
|
|
||||||
class TenderDetailHeader extends StatelessWidget {
|
class TenderDetailHeader extends StatelessWidget {
|
||||||
final bool isBig;
|
final bool isScreenBig;
|
||||||
const TenderDetailHeader({required this.isBig, super.key});
|
const TenderDetailHeader({required this.isScreenBig, super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@@ -29,7 +29,7 @@ class TenderDetailHeader extends StatelessWidget {
|
|||||||
SizedBox(height: 10.0.h()),
|
SizedBox(height: 10.0.h()),
|
||||||
const Divider(),
|
const Divider(),
|
||||||
SizedBox(height: 5.0.h()),
|
SizedBox(height: 5.0.h()),
|
||||||
TenderDetailInfoSection(isBig: isBig,),
|
TenderDetailInfoSection(isScreenBig: isScreenBig),
|
||||||
TenderLocationSection(),
|
TenderLocationSection(),
|
||||||
SizedBox(height: 16.0.h()),
|
SizedBox(height: 16.0.h()),
|
||||||
TenderDocumentSection(),
|
TenderDocumentSection(),
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ import 'package:tm_app/views/detail/widgets/deadline_item.dart';
|
|||||||
import 'package:tm_app/views/detail/widgets/info_item.dart';
|
import 'package:tm_app/views/detail/widgets/info_item.dart';
|
||||||
|
|
||||||
class TenderDetailInfoSection extends StatelessWidget {
|
class TenderDetailInfoSection extends StatelessWidget {
|
||||||
final bool isBig;
|
final bool isScreenBig;
|
||||||
|
|
||||||
const TenderDetailInfoSection({required this.isBig ,super.key});
|
const TenderDetailInfoSection({required this.isScreenBig, super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@@ -22,7 +22,8 @@ class TenderDetailInfoSection extends StatelessWidget {
|
|||||||
approvalText: AppStrings.tenderApprovalText,
|
approvalText: AppStrings.tenderApprovalText,
|
||||||
approvalDate: AppStrings.tenderApprovalDateExample,
|
approvalDate: AppStrings.tenderApprovalDateExample,
|
||||||
submissionText: AppStrings.tenderSubmissionText,
|
submissionText: AppStrings.tenderSubmissionText,
|
||||||
submissionDate: AppStrings.tenderSubmissionDateExample, isBig: isBig,
|
submissionDate: AppStrings.tenderSubmissionDateExample,
|
||||||
|
isScreenBig: isScreenBig,
|
||||||
),
|
),
|
||||||
InfoItem(
|
InfoItem(
|
||||||
title: AppStrings.tenderClientLabel,
|
title: AppStrings.tenderClientLabel,
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import 'package:tm_app/core/theme/colors.dart';
|
|||||||
import '../../../core/constants/assets.dart';
|
import '../../../core/constants/assets.dart';
|
||||||
import '../../../core/constants/strings.dart';
|
import '../../../core/constants/strings.dart';
|
||||||
import '../../../core/utils/size_config.dart';
|
import '../../../core/utils/size_config.dart';
|
||||||
import '../widgets/widgets.dart';
|
|
||||||
import '../../../view_models/login_view_model.dart';
|
import '../../../view_models/login_view_model.dart';
|
||||||
|
import '../widgets/widgets.dart';
|
||||||
|
|
||||||
class LoginDesktopPage extends StatefulWidget {
|
class LoginDesktopPage extends StatefulWidget {
|
||||||
const LoginDesktopPage({super.key});
|
const LoginDesktopPage({super.key});
|
||||||
@@ -40,7 +40,7 @@ class _LoginDesktopPageState extends State<LoginDesktopPage> {
|
|||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 24.0.w()),
|
padding: EdgeInsets.symmetric(horizontal: 24.0.w()),
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: 120.0.w(),
|
width: 526,
|
||||||
child: ListenableBuilder(
|
child: ListenableBuilder(
|
||||||
listenable: _viewModel,
|
listenable: _viewModel,
|
||||||
builder: (context, _) {
|
builder: (context, _) {
|
||||||
@@ -79,9 +79,10 @@ class _LoginDesktopPageState extends State<LoginDesktopPage> {
|
|||||||
|
|
||||||
BaseButton(
|
BaseButton(
|
||||||
isEnabled: _viewModel.isLoginEnabled,
|
isEnabled: _viewModel.isLoginEnabled,
|
||||||
onPressed: _viewModel.isLoginEnabled
|
onPressed:
|
||||||
? () => HomeRouteData().go(context)
|
_viewModel.isLoginEnabled
|
||||||
: null,
|
? () => HomeRouteData().go(context)
|
||||||
|
: null,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import 'package:tm_app/core/theme/colors.dart';
|
|||||||
import '../../../core/constants/assets.dart';
|
import '../../../core/constants/assets.dart';
|
||||||
import '../../../core/constants/strings.dart';
|
import '../../../core/constants/strings.dart';
|
||||||
import '../../../core/utils/size_config.dart';
|
import '../../../core/utils/size_config.dart';
|
||||||
import '../widgets/widgets.dart';
|
|
||||||
import '../../../view_models/login_view_model.dart';
|
import '../../../view_models/login_view_model.dart';
|
||||||
|
import '../widgets/widgets.dart';
|
||||||
|
|
||||||
class LoginTabletPage extends StatefulWidget {
|
class LoginTabletPage extends StatefulWidget {
|
||||||
const LoginTabletPage({super.key});
|
const LoginTabletPage({super.key});
|
||||||
@@ -35,12 +35,12 @@ class _LoginTabletPageState extends State<LoginTabletPage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
SizeConfig.init(context);
|
SizeConfig.init(context);
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor:AppColors.backgroundColor,
|
backgroundColor: AppColors.backgroundColor,
|
||||||
body: Center(
|
body: Center(
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 24.0.w()),
|
padding: EdgeInsets.symmetric(horizontal: 24.0.w()),
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: 120.0.w(),
|
width: 526,
|
||||||
child: ListenableBuilder(
|
child: ListenableBuilder(
|
||||||
listenable: _viewModel,
|
listenable: _viewModel,
|
||||||
builder: (context, _) {
|
builder: (context, _) {
|
||||||
@@ -79,9 +79,10 @@ class _LoginTabletPageState extends State<LoginTabletPage> {
|
|||||||
|
|
||||||
BaseButton(
|
BaseButton(
|
||||||
isEnabled: _viewModel.isLoginEnabled,
|
isEnabled: _viewModel.isLoginEnabled,
|
||||||
onPressed: _viewModel.isLoginEnabled
|
onPressed:
|
||||||
? () => HomeRouteData().go(context)
|
_viewModel.isLoginEnabled
|
||||||
: null,
|
? () => HomeRouteData().go(context)
|
||||||
|
: null,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ class BaseButton extends StatelessWidget {
|
|||||||
final double? borderWidth;
|
final double? borderWidth;
|
||||||
final double? borderRadius;
|
final double? borderRadius;
|
||||||
final double? elevation;
|
final double? elevation;
|
||||||
|
final double? width;
|
||||||
|
|
||||||
const BaseButton({
|
const BaseButton({
|
||||||
required this.isEnabled,
|
required this.isEnabled,
|
||||||
@@ -25,13 +26,14 @@ class BaseButton extends StatelessWidget {
|
|||||||
this.borderWidth,
|
this.borderWidth,
|
||||||
this.borderRadius,
|
this.borderRadius,
|
||||||
this.elevation,
|
this.elevation,
|
||||||
|
this.width,
|
||||||
super.key,
|
super.key,
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
width: double.infinity,
|
width: width ?? double.infinity,
|
||||||
height: 55.0.h(),
|
height: 55.0.h(),
|
||||||
child: ElevatedButton(
|
child: ElevatedButton(
|
||||||
onPressed: isEnabled ? onPressed : null,
|
onPressed: isEnabled ? onPressed : null,
|
||||||
|
|||||||
Reference in New Issue
Block a user