Skip to content

Commit 3108453

Browse files
committed
cleaned up new folder
1 parent d3d6774 commit 3108453

File tree

2 files changed

+18
-52
lines changed

2 files changed

+18
-52
lines changed

lib/screens/new/new_product_screen.dart

Lines changed: 15 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import 'package:basic/constants/color_constants.dart';
22
import 'package:basic/constants/textstyle_constants.dart';
33
import 'package:basic/screens/new/new_service_screen.dart';
4+
import 'package:basic/widgets/row_price_details_widget.dart';
45
import 'package:flutter/material.dart';
56
import 'package:flutter/services.dart';
67

@@ -330,34 +331,22 @@ class NewProductScreen extends StatelessWidget {
330331
color: desaturatedGreyColor,
331332
child: Column(
332333
children: [
333-
Row(
334-
mainAxisAlignment: MainAxisAlignment.spaceBetween,
335-
children: [
336-
Text(
337-
'Subtotal (XAF): ',
338-
style: captionTextStyle
339-
.merge(TextStyle(color: lightGreyColor)),
340-
),
341-
Expanded(
342-
child: Text(
343-
'0',
344-
textAlign: TextAlign.end,
345-
style: captionTextStyle
346-
.merge(TextStyle(color: lightGreyColor)),
347-
),
348-
),
349-
],
334+
RowPriceDetailsWidget(
335+
title: 'Subtotal (XAF): ',
336+
price: '0',
337+
titleTextStyle: captionTextStyle.merge(
338+
TextStyle(color: lightGreyColor),
339+
),
340+
priceTextStyle: captionTextStyle.merge(
341+
TextStyle(color: lightGreyColor),
342+
),
350343
),
351344
SizedBox(height: 10),
352-
Row(
353-
mainAxisAlignment: MainAxisAlignment.spaceBetween,
354-
children: [
355-
Text('Total (XAF): ', style: bodyBoldTextStyle),
356-
Expanded(
357-
child: Text('0',
358-
textAlign: TextAlign.end, style: bodyBoldTextStyle),
359-
),
360-
],
345+
RowPriceDetailsWidget(
346+
title: 'Total (XAF): ',
347+
price: '0',
348+
titleTextStyle: bodyBoldTextStyle,
349+
priceTextStyle: bodyBoldTextStyle,
361350
),
362351
SizedBox(height: 20),
363352
InkWell(

lib/screens/new/new_service_screen.dart

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import 'package:basic/constants/color_constants.dart';
22
import 'package:basic/constants/textstyle_constants.dart';
3+
import 'package:basic/widgets/row_price_details_widget.dart';
34
import 'package:flutter/material.dart';
45
import 'package:flutter/services.dart';
56

@@ -300,7 +301,7 @@ class NewServiceScreen extends StatelessWidget {
300301
color: desaturatedGreyColor,
301302
child: Column(
302303
children: [
303-
_buildRowPrice(
304+
RowPriceDetailsWidget(
304305
title: 'Subtotal (XAF): ',
305306
price: '0',
306307
titleTextStyle: captionTextStyle.merge(
@@ -311,7 +312,7 @@ class NewServiceScreen extends StatelessWidget {
311312
),
312313
),
313314
SizedBox(height: 10),
314-
_buildRowPrice(
315+
RowPriceDetailsWidget(
315316
title: 'Total (XAF): ',
316317
price: '0',
317318
titleTextStyle: bodyBoldTextStyle,
@@ -341,28 +342,4 @@ class NewServiceScreen extends StatelessWidget {
341342
],
342343
);
343344
}
344-
345-
Widget _buildRowPrice({
346-
required String title,
347-
required String price,
348-
required TextStyle titleTextStyle,
349-
required TextStyle priceTextStyle,
350-
}) {
351-
return Row(
352-
mainAxisAlignment: MainAxisAlignment.spaceBetween,
353-
children: [
354-
Text(
355-
title,
356-
style: titleTextStyle,
357-
),
358-
Expanded(
359-
child: Text(
360-
price,
361-
textAlign: TextAlign.end,
362-
style: priceTextStyle,
363-
),
364-
),
365-
],
366-
);
367-
}
368345
}

0 commit comments

Comments
 (0)