Frontend first draft
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
|
||||
class BalanceAddFunds extends StatelessWidget {
|
||||
final VoidCallback onTopUp;
|
||||
|
||||
const BalanceAddFunds({
|
||||
super.key,
|
||||
required this.onTopUp,
|
||||
});
|
||||
|
||||
static const double _borderRadius = 5.0;
|
||||
static const double _iconSize = 24.0;
|
||||
static const double _paddingVertical = 2.0;
|
||||
static const double _spacingSmall = 3.0;
|
||||
static const double _spacingMedium = 5.0;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final textTheme = Theme.of(context).textTheme;
|
||||
final colorScheme = Theme.of(context).colorScheme;
|
||||
|
||||
return InkWell(
|
||||
onTap: onTopUp,
|
||||
borderRadius: BorderRadius.circular(_borderRadius),
|
||||
hoverColor: colorScheme.primaryContainer,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: _paddingVertical),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
const SizedBox(width: _spacingSmall),
|
||||
Icon(
|
||||
Icons.add_circle,
|
||||
color: colorScheme.primary,
|
||||
size: _iconSize,
|
||||
),
|
||||
const SizedBox(width: _spacingMedium),
|
||||
Text(
|
||||
'Add funds',
|
||||
style: textTheme.bodyMedium?.copyWith(
|
||||
color: colorScheme.primary,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: _spacingSmall),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user