mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-26 06:08:40 +01:00
new buy/sell
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:vector_graphics/vector_graphics.dart';
|
||||
@@ -86,7 +87,7 @@ class CakeImageWidget extends StatelessWidget {
|
||||
allowDrawingOutsideViewBox: allowDrawingOutsideViewBox ?? false,
|
||||
fit: fit ?? BoxFit.contain,
|
||||
placeholderBuilder: (_) {
|
||||
return loadingWidget ?? const Center(child: CircularProgressIndicator());
|
||||
return loadingWidget ?? SizedBox(height: height, width: width, child: Center(child: CupertinoActivityIndicator()));
|
||||
},
|
||||
errorBuilder: (_, __, ___) => _buildErrorWidget(context),
|
||||
)
|
||||
@@ -99,7 +100,7 @@ class CakeImageWidget extends StatelessWidget {
|
||||
filterQuality: filterQuality ?? FilterQuality.medium,
|
||||
loadingBuilder: (_, Widget child, ImageChunkEvent? progress) {
|
||||
if (progress == null) return child;
|
||||
return loadingWidget ?? const Center(child: CircularProgressIndicator());
|
||||
return loadingWidget ?? SizedBox(height: height, width: width, child: Center(child: CupertinoActivityIndicator()));
|
||||
},
|
||||
errorBuilder: (_, __, ___) => _buildErrorWidget(context),
|
||||
);
|
||||
|
||||
@@ -29,31 +29,29 @@ class ListItemDropdownWidget extends StatelessWidget {
|
||||
return ListItemStyleWrapper(
|
||||
isFirstInSection: isFirstInSection,
|
||||
isLastInSection: isLastInSection,
|
||||
onTap: onTap,
|
||||
builder: (context, textStyle, labelStyle) {
|
||||
return InkWell(
|
||||
onTap: onTap,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(label, style: textStyle),
|
||||
Row(
|
||||
children: [
|
||||
if (trailingText != null)
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 8.0),
|
||||
child: Text(
|
||||
trailingText!,
|
||||
style: labelStyle,
|
||||
),
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(label, style: textStyle),
|
||||
Row(
|
||||
children: [
|
||||
if (trailingText != null)
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 8.0),
|
||||
child: Text(
|
||||
trailingText!,
|
||||
style: labelStyle,
|
||||
),
|
||||
Icon(
|
||||
Icons.keyboard_arrow_down,
|
||||
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
Icon(
|
||||
Icons.keyboard_arrow_down,
|
||||
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
@@ -23,22 +23,25 @@ class ListItemRegularRowWidget extends StatelessWidget {
|
||||
this.foregroundColor,
|
||||
this.trailingIconSize,
|
||||
this.bottomWidget,
|
||||
this.subtitleColor,
|
||||
this.trailingWidget,
|
||||
this.copyableText,
|
||||
this.leadingIconErrorWidget,
|
||||
this.leadingIconSize,
|
||||
this.badgeIconSize,
|
||||
this.iconColor});
|
||||
this.iconColor, this.secondaryLabel});
|
||||
|
||||
final String keyValue;
|
||||
final String label;
|
||||
final String? subtitle;
|
||||
final String? trailingText;
|
||||
final String? secondaryLabel;
|
||||
final String? iconPath;
|
||||
final String? badgeIconPath;
|
||||
final VoidCallback? onTap;
|
||||
final bool isFirstInSection;
|
||||
final bool isLastInSection;
|
||||
final Color? subtitleColor;
|
||||
final bool showArrow;
|
||||
final String? trailingIconPath;
|
||||
final Widget? bottomWidget;
|
||||
@@ -131,14 +134,21 @@ class ListItemRegularRowWidget extends StatelessWidget {
|
||||
color: Theme.of(context).colorScheme.primary),
|
||||
)
|
||||
else
|
||||
Text(label,
|
||||
style: foregroundColor == null
|
||||
? textStyle
|
||||
: textStyle.copyWith(color: foregroundColor)),
|
||||
Row(
|
||||
spacing: 4,
|
||||
children: [
|
||||
Text(label,
|
||||
style: foregroundColor == null
|
||||
? textStyle
|
||||
: textStyle.copyWith(color: foregroundColor)),
|
||||
if(secondaryLabel != null)
|
||||
Text(secondaryLabel!, style: textStyle.copyWith(color: Theme.of(context).colorScheme.onSurfaceVariant),)
|
||||
],
|
||||
),
|
||||
if (subtitle != null)
|
||||
Text(
|
||||
subtitle!,
|
||||
style: labelStyle.copyWith(fontSize: 12),
|
||||
style: subtitleColor == null ? labelStyle.copyWith(fontSize: 12) : labelStyle.copyWith(fontSize: 12, color: subtitleColor),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -98,6 +98,8 @@ class NewListSections extends StatelessWidget {
|
||||
iconPath: item.iconPath,
|
||||
badgeIconPath: item.badgeIconPath,
|
||||
trailingIconPath: item.trailingIconPath,
|
||||
secondaryLabel: item.secondaryLabel,
|
||||
subtitleColor: item.subtitleColor,
|
||||
onTap: tapHandlers[item.keyValue] ?? item.onTap,
|
||||
isFirstInSection: isFirst,
|
||||
isLastInSection: isLast,
|
||||
|
||||
Reference in New Issue
Block a user