mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-18 05:51:34 +02:00
code formatting
This commit is contained in:
@@ -3,13 +3,13 @@ import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class StandardCheckbox extends StatelessWidget {
|
||||
StandardCheckbox({
|
||||
required this.value,
|
||||
this.caption = '',
|
||||
this.gradientBackground = false,
|
||||
this.borderColor,
|
||||
this.iconColor,
|
||||
required this.onChanged});
|
||||
StandardCheckbox(
|
||||
{required this.value,
|
||||
this.caption = '',
|
||||
this.gradientBackground = false,
|
||||
this.borderColor,
|
||||
this.iconColor,
|
||||
required this.onChanged});
|
||||
|
||||
final bool value;
|
||||
final String caption;
|
||||
@@ -18,34 +18,23 @@ class StandardCheckbox extends StatelessWidget {
|
||||
final Color? iconColor;
|
||||
final Function(bool) onChanged;
|
||||
|
||||
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
final baseGradient = LinearGradient(colors: [
|
||||
Theme.of(context).primaryTextTheme.subtitle1!.color!,
|
||||
Theme.of(context).primaryTextTheme.subtitle1!.decorationColor!,
|
||||
], begin: Alignment.centerLeft, end: Alignment.centerRight);
|
||||
|
||||
final boxBorder = Border.all(
|
||||
color: borderColor ?? Theme.of(context)
|
||||
.primaryTextTheme
|
||||
.caption!
|
||||
.color!,
|
||||
width: 1.0);
|
||||
|
||||
color: borderColor ?? Theme.of(context).primaryTextTheme.caption!.color!, width: 1.0);
|
||||
|
||||
final checkedBoxDecoration = BoxDecoration(
|
||||
gradient: gradientBackground ? baseGradient : null,
|
||||
border: gradientBackground ? null : boxBorder,
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(8.0)));
|
||||
borderRadius: BorderRadius.all(Radius.circular(8.0)));
|
||||
|
||||
final uncheckedBoxDecoration = BoxDecoration(
|
||||
border: boxBorder,
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(8.0)));
|
||||
final uncheckedBoxDecoration =
|
||||
BoxDecoration(border: boxBorder, borderRadius: BorderRadius.all(Radius.circular(8.0)));
|
||||
|
||||
return GestureDetector(
|
||||
onTap: () => onChanged(!value),
|
||||
@@ -58,27 +47,23 @@ class StandardCheckbox extends StatelessWidget {
|
||||
width: 24.0,
|
||||
decoration: value ? checkedBoxDecoration : uncheckedBoxDecoration,
|
||||
child: value
|
||||
? Icon(
|
||||
Icons.check,
|
||||
color: iconColor ?? Colors.blue,
|
||||
size: 20.0,
|
||||
)
|
||||
: Offstage(),
|
||||
? Icon(
|
||||
Icons.check,
|
||||
color: iconColor ?? Colors.blue,
|
||||
size: 20.0,
|
||||
)
|
||||
: Offstage(),
|
||||
),
|
||||
if (caption.isNotEmpty) Padding(
|
||||
padding: EdgeInsets.only(left: 10),
|
||||
child: Text(
|
||||
caption,
|
||||
style: TextStyle(
|
||||
fontSize: 16.0,
|
||||
color: Theme.of(context)
|
||||
.primaryTextTheme!
|
||||
.headline6!
|
||||
.color!),
|
||||
)
|
||||
)
|
||||
if (caption.isNotEmpty)
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 10),
|
||||
child: Text(
|
||||
caption,
|
||||
style: TextStyle(
|
||||
fontSize: 16.0, color: Theme.of(context).primaryTextTheme!.headline6!.color!),
|
||||
))
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import 'package:cake_wallet/palette.dart';
|
||||
import 'package:cake_wallet/src/widgets/standart_list_card.dart';
|
||||
import 'package:cake_wallet/src/widgets/standart_list_status_row.dart';
|
||||
import 'package:cake_wallet/src/widgets/standard_list_card.dart';
|
||||
import 'package:cake_wallet/src/widgets/standard_list_status_row.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class StandardListRow extends StatelessWidget {
|
||||
@@ -217,7 +217,7 @@ class SectionStandardList extends StatelessWidget {
|
||||
return Container();
|
||||
}
|
||||
|
||||
if (row is StandartListStatusRow || row is TradeDatailsStandartListCard) {
|
||||
if (row is StandardListStatusRow || row is TradeDetailsStandardListCard) {
|
||||
return Container();
|
||||
}
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@ import 'package:cake_wallet/palette.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:cake_wallet/themes/theme_base.dart';
|
||||
|
||||
class TradeDatailsStandartListCard extends StatelessWidget {
|
||||
TradeDatailsStandartListCard(
|
||||
class TradeDetailsStandardListCard extends StatelessWidget {
|
||||
TradeDetailsStandardListCard(
|
||||
{required this.id,
|
||||
required this.create,
|
||||
required this.pair,
|
||||
@@ -1,8 +1,8 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class StandartListRow extends StatelessWidget {
|
||||
StandartListRow(
|
||||
class AnotherStandardListRow extends StatelessWidget {
|
||||
AnotherStandardListRow(
|
||||
{required this.title,
|
||||
required this.value,
|
||||
this.titleFontSize = 14,
|
||||
+2
-2
@@ -3,8 +3,8 @@ import 'package:cake_wallet/src/screens/dashboard/widgets/sync_indicator_icon.da
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class StandartListStatusRow extends StatelessWidget {
|
||||
StandartListStatusRow({required this.title, required this.value});
|
||||
class StandardListStatusRow extends StatelessWidget {
|
||||
StandardListStatusRow({required this.title, required this.value});
|
||||
|
||||
final String title;
|
||||
final String value;
|
||||
@@ -1,17 +1,17 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class StandartSwitch extends StatefulWidget {
|
||||
const StandartSwitch({required this.value, required this.onTaped});
|
||||
class StandardSwitch extends StatefulWidget {
|
||||
const StandardSwitch({required this.value, required this.onTaped});
|
||||
|
||||
final bool value;
|
||||
final VoidCallback onTaped;
|
||||
|
||||
@override
|
||||
StandartSwitchState createState() => StandartSwitchState();
|
||||
StandardSwitchState createState() => StandardSwitchState();
|
||||
}
|
||||
|
||||
class StandartSwitchState extends State<StandartSwitch> {
|
||||
class StandardSwitchState extends State<StandardSwitch> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GestureDetector(
|
||||
Reference in New Issue
Block a user