extract SectionDivider widget

This commit is contained in:
Serhii
2022-12-23 23:58:39 +02:00
parent 00c008ed8b
commit 89028500e7
7 changed files with 26 additions and 39 deletions
+4 -12
View File
@@ -1,4 +1,5 @@
import 'dart:ui';
import 'package:cake_wallet/src/widgets/section_divider.dart';
import 'package:flutter/material.dart';
import 'package:cake_wallet/palette.dart';
@@ -76,10 +77,7 @@ class BaseAlertDialog extends StatelessWidget {
),
)),
),
Container(
width: 1,
color: Theme.of(context).dividerColor,
),
SectionDivider(),
Expanded(
child: TextButton(
onPressed: actionRight,
@@ -140,10 +138,7 @@ class BaseAlertDialog extends StatelessWidget {
isDividerExists
? Padding(
padding: EdgeInsets.only(top: 16, bottom: 8),
child: Container(
height: 1,
color: Theme.of(context).dividerColor,
),
child: SectionDivider(),
)
: Offstage(),
Padding(
@@ -152,10 +147,7 @@ class BaseAlertDialog extends StatelessWidget {
)
],
),
Container(
height: 1,
color: Theme.of(context).dividerColor,
),
SectionDivider(),
actionButtons(context)
],
),
+13
View File
@@ -0,0 +1,13 @@
import 'package:flutter/material.dart';
class SectionDivider extends StatelessWidget {
const SectionDivider();
@override
Widget build(BuildContext context) {
return Container(
height: 1,
color: Theme.of(context).dividerColor,
);
}
}