Skip to content

Commit

Permalink
#197 handling if data is not in data agreement attribute
Browse files Browse the repository at this point in the history
If the data is not in agreement with the specified attribute, handle it with sizedbox
  • Loading branch information
lijogeorgep authored and josmilan committed Nov 15, 2023
1 parent e43b4ac commit 7e9ebf4
Showing 1 changed file with 34 additions and 25 deletions.
59 changes: 34 additions & 25 deletions lib/app/modules/register/views/register_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -443,14 +443,15 @@ class RegisterView extends BaseView<RegisterController> {
elevation: 0,
margin: const EdgeInsets.symmetric(horizontal: 0, vertical: 16),
color: AppColors.pageBackground,

shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(cardRadius),

),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
getDataAgreement(context),

getDataAgreement(context)
// _cgmWidget(context),
// const Divider(),
// _insightsWidget(context),
Expand All @@ -468,30 +469,38 @@ class RegisterView extends BaseView<RegisterController> {

Widget getDataAgreement(BuildContext context) {
return Obx(
() => ListView.builder(
shrinkWrap: true,
itemCount: _registerController.dataAttributes.length,
itemBuilder: (BuildContext context, index) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
() {
if(_registerController.dataAttributes.isNotEmpty){
return ListView.builder(
shrinkWrap: true,
itemCount: _registerController.dataAttributes.length,
itemBuilder: (BuildContext context, index) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,

children: [
Padding(
padding: const EdgeInsets.symmetric(horizontal: 12.0, vertical:10.0),
child: Text(
_registerController.dataAttributes[index],
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.w500,
color: Colors.black,
),
),
),
if (index < _registerController.dataAttributes.length - 1) const Divider(),
],
);
},
),
children: [
Padding(
padding: const EdgeInsets.symmetric(horizontal: 12.0, vertical:12.0),
child: Text(
_registerController.dataAttributes[index],
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.w500,
color: Colors.black,
),
),
),
if (index < _registerController.dataAttributes.length - 1) const Divider(),
],
);
},
);
}
else{
return const SizedBox();
}

}
);


Expand Down

0 comments on commit 7e9ebf4

Please sign in to comment.