improvement.

design_3.0_latest
Sikander Saleem 1 year ago
parent e1aaa71ae7
commit c0afad329b

@ -4,7 +4,6 @@ import 'package:shimmer/shimmer.dart';
import 'package:test_sa/extensions/context_extension.dart';
import 'package:test_sa/extensions/int_extensions.dart';
import 'package:test_sa/extensions/text_extensions.dart';
import 'package:test_sa/views/app_style/sizing.dart';
import '../new_views/app_style/app_color.dart';
@ -32,7 +31,10 @@ extension WidgetExtensions on Widget {
flushbarPosition: FlushbarPosition.TOP,
backgroundColor: backgroundColor ?? AppColor.green70,
title: title,
messageText: Text(message,style: AppTextStyles.heading6.copyWith(color: AppColor.white10),),
messageText: Text(
message,
style: AppTextStyles.heading6.copyWith(color: AppColor.white10),
),
duration: Duration(seconds: duration ?? 3),
flushbarStyle: FlushbarStyle.GROUNDED,
reverseAnimationCurve: Curves.easeInOut,
@ -79,14 +81,14 @@ extension WidgetExtensions on Widget {
).toShadowContainer(context)
: this;
Widget toShadowContainer(BuildContext context, {bool showShadow = true,Color? backgroundColor, double padding = 16}) => showShadow
Widget toShadowContainer(BuildContext context, {bool withoutShadow = true, bool showShadow = true, Color? backgroundColor, double padding = 16}) => withoutShadow
? Container(
padding: EdgeInsets.all(padding),
width: double.infinity,
decoration: ShapeDecoration(
color: backgroundColor?? AppColor.background(context),
color: backgroundColor ?? AppColor.background(context),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(14)),
shadows: [boxShadowR14],
shadows: showShadow ? [boxShadowR14] : null,
),
child: this,
)

@ -76,7 +76,7 @@ class AssetItemView extends StatelessWidget {
],
),
],
).toShadowContainer(context, showShadow: showShadow).onPress(() {
).toShadowContainer(context, withoutShadow: showShadow).onPress(() {
Navigator.of(context).push(MaterialPageRoute(builder: (_) => DeviceTransferDetails(model: AssetTransfer(id: requestData!.id!))));
});
}
@ -134,7 +134,7 @@ class AssetItemView extends StatelessWidget {
],
),
],
).toShadowContainer(context, showShadow: showShadow).onPress(() {
).toShadowContainer(context, withoutShadow: showShadow).onPress(() {
Navigator.of(context).push(MaterialPageRoute(builder: (_) => DeviceTransferDetails(model: AssetTransfer(id: requestDetails!.id!))));
});
}

@ -68,7 +68,7 @@ class GasRefillItemView extends StatelessWidget {
],
),
],
).toShadowContainer(context, showShadow: showShadow).onPress(() {
).toShadowContainer(context, withoutShadow: showShadow).onPress(() {
Navigator.of(context).push(
MaterialPageRoute(
builder: (_) => GasRefillDetailsPage(
@ -127,7 +127,7 @@ class GasRefillItemView extends StatelessWidget {
],
),
],
).toShadowContainer(context, showShadow: showShadow).onPress(() {
).toShadowContainer(context, withoutShadow: showShadow).onPress(() {
Navigator.of(context).push(
MaterialPageRoute(
builder: (_) => GasRefillDetailsPage(

@ -67,7 +67,7 @@ class PpmItemView extends StatelessWidget {
],
),
],
).toShadowContainer(context, showShadow: showShadow).onPress(() {
).toShadowContainer(context, withoutShadow: showShadow).onPress(() {
// Navigator.of(context).push(MaterialPageRoute(builder: (_) => PpmDetailsPage(request: request)));
});
}
@ -117,7 +117,7 @@ class PpmItemView extends StatelessWidget {
],
),
],
).toShadowContainer(context, showShadow: showShadow).onPress(() {
).toShadowContainer(context, withoutShadow: showShadow).onPress(() {
Navigator.of(context).push(MaterialPageRoute(builder: (_) => PpmDetailsPage(request: requestDetails!)));
});
}

@ -69,7 +69,7 @@ class ServiceRequestItemView extends StatelessWidget {
],
),
],
).toShadowContainer(context, showShadow: showShadow).onPress(() {
).toShadowContainer(context, withoutShadow: showShadow).onPress(() {
Navigator.of(context).push(MaterialPageRoute(builder: (_) => RequestDetailMain(requestId: requestData!.id!)));
});
}
@ -120,7 +120,7 @@ class ServiceRequestItemView extends StatelessWidget {
],
),
],
).toShadowContainer(context, showShadow: showShadow).onPress(() {
).toShadowContainer(context, withoutShadow: showShadow).onPress(() {
Navigator.of(context).push(MaterialPageRoute(builder: (_) => RequestDetailMain(requestId: requestDetails!.id!)));
});
}

@ -44,7 +44,7 @@ class ActivitiesListView extends StatelessWidget {
: ListView.separated(
padding: const EdgeInsets.all(16),
itemCount: activities.length,
separatorBuilder: (czt, index) => 8.height,
separatorBuilder: (czt, index) => 16.height,
itemBuilder: (context, index) {
return Column(
mainAxisSize: MainAxisSize.min,
@ -140,7 +140,7 @@ class ActivitiesListView extends StatelessWidget {
FilesList(images: activities[index].activitySparePart!.acitiySparePartAttachments!.map((toElement) => URLs.getFileUrl(toElement.name!)!).toList()),
],
],
).toShadowContainer(context, padding: 12).onPress(() {
).toShadowContainer(context, padding: 12, showShadow: false).onPress(() {
//TODO write onview detail method..
// Navigator.push(
// context,

Loading…
Cancel
Save