diff --git a/android/build/reports/problems/problems-report.html b/android/build/reports/problems/problems-report.html index 7e3dee6f..5f21aa52 100644 --- a/android/build/reports/problems/problems-report.html +++ b/android/build/reports/problems/problems-report.html @@ -650,7 +650,7 @@ diff --git a/lib/presentation/home_screen.dart b/lib/presentation/home_screen.dart index ec804972..1be99e91 100644 --- a/lib/presentation/home_screen.dart +++ b/lib/presentation/home_screen.dart @@ -107,6 +107,14 @@ class _HomeScreenState extends State { } final String? transactionGroupId = transaction.group?.clientId; + final bool isTransfer = transaction.transaction.transferId != null || + (transaction.transaction.transferClientId?.isNotEmpty ?? false); + + // Transfers without an explicit group are global (visible everywhere). + // If a transfer has a group assigned, it follows normal filtering. + if (isTransfer && transactionGroupId == null) { + return true; + } // Include transaction if: final bool groupMatches = transactionGroupId == selectedGroupId; diff --git a/lib/presentation/transactions/add_transaction_form_compact_layout.dart b/lib/presentation/transactions/add_transaction_form_compact_layout.dart index 5f0e544f..b4ff97a1 100644 --- a/lib/presentation/transactions/add_transaction_form_compact_layout.dart +++ b/lib/presentation/transactions/add_transaction_form_compact_layout.dart @@ -25,6 +25,7 @@ import 'package:trakli/presentation/transactions/transaction_extras_section.dart import 'package:trakli/presentation/transactions/transaction_intent_selector.dart'; import 'package:trakli/presentation/utils/app_navigator.dart'; import 'package:trakli/presentation/utils/custom_auto_complete_search.dart'; +import 'package:trakli/presentation/utils/design_tokens.dart'; import 'package:trakli/presentation/utils/enums.dart'; import 'package:trakli/presentation/utils/helpers.dart'; import 'package:trakli/presentation/wallets/add_wallet_screen.dart'; @@ -204,6 +205,7 @@ class _AddTransactionFormCompactLayoutState @override Widget build(BuildContext context) { super.build(context); + final tones = context.tones; return SingleChildScrollView( padding: EdgeInsets.symmetric( horizontal: 16.w, @@ -226,8 +228,9 @@ class _AddTransactionFormCompactLayoutState decoration: InputDecoration( hintText: LocaleKeys.exampleAmount.tr(), labelText: LocaleKeys.transactionAmount.tr(), + fillColor: tones.bgSurface, focusedBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(8), + borderRadius: BorderRadius.circular(AppRadii.md.r), borderSide: BorderSide( color: widget.accentColor, ), @@ -254,12 +257,15 @@ class _AddTransactionFormCompactLayoutState context: context, theme: CurrencyPickerThemeData( bottomSheetHeight: 0.7.sh, - backgroundColor: - Theme.of(context).scaffoldBackgroundColor, + backgroundColor: tones.bgSurface, flagSize: 24.sp, + titleTextStyle: TextStyle( + color: tones.textPrimary, + fontSize: 16.sp, + ), subtitleTextStyle: TextStyle( fontSize: 12.sp, - color: Theme.of(context).primaryColor, + color: tones.textSecondary, ), ), onSelect: (Currency currencyValue) { @@ -274,7 +280,7 @@ class _AddTransactionFormCompactLayoutState ), decoration: BoxDecoration( color: widget.accentColor.withValues(alpha: 0.1), - borderRadius: BorderRadius.circular(8.r), + borderRadius: BorderRadius.circular(AppRadii.md.r), border: Border.all( color: widget.accentColor.withValues(alpha: 0.35), width: 1, @@ -378,14 +384,19 @@ class _AddTransactionFormCompactLayoutState controller: dateController, decoration: InputDecoration( labelText: LocaleKeys.date.tr(), + fillColor: tones.bgSurface, suffixIcon: Padding( padding: const EdgeInsets.all(12), child: SvgPicture.asset( Assets.images.calendar, + colorFilter: ColorFilter.mode( + tones.textMuted, + BlendMode.srcIn, + ), ), ), focusedBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(8), + borderRadius: BorderRadius.circular(AppRadii.md.r), borderSide: BorderSide( color: widget.accentColor, ), @@ -416,14 +427,19 @@ class _AddTransactionFormCompactLayoutState controller: timeController, decoration: InputDecoration( labelText: LocaleKeys.time.tr(), + fillColor: tones.bgSurface, suffixIcon: Padding( padding: const EdgeInsets.all(12), child: SvgPicture.asset( Assets.images.clock, + colorFilter: ColorFilter.mode( + tones.textMuted, + BlendMode.srcIn, + ), ), ), focusedBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(8), + borderRadius: BorderRadius.circular(AppRadii.md.r), borderSide: BorderSide( color: widget.accentColor, ), @@ -556,8 +572,9 @@ class _AddTransactionFormCompactLayoutState decoration: InputDecoration( labelText: LocaleKeys.transactionDescription.tr(), hintText: LocaleKeys.transactionTypeHere.tr(), + fillColor: tones.bgSurface, focusedBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(8), + borderRadius: BorderRadius.circular(AppRadii.md.r), borderSide: BorderSide( color: widget.accentColor, ), diff --git a/lib/presentation/transactions/transaction_extras_section.dart b/lib/presentation/transactions/transaction_extras_section.dart index 241fb659..a236ecf0 100644 --- a/lib/presentation/transactions/transaction_extras_section.dart +++ b/lib/presentation/transactions/transaction_extras_section.dart @@ -95,13 +95,10 @@ class _TransactionExtrasSectionState extends State { super.initState(); // Edit mode: resolve the linked original expense for display. if (c.wasRefund && c.refundOfServerId != null && c.refundOfLabel == null) { - final original = context - .read() - .state - .transactions - .firstWhereOrNull( - (t) => t.transaction.id == c.refundOfServerId, - ); + final original = + context.read().state.transactions.firstWhereOrNull( + (t) => t.transaction.id == c.refundOfServerId, + ); if (original != null) { c.refundOfClientId = original.transaction.clientId; c.syncedRefundOfClientId = original.transaction.clientId; @@ -134,9 +131,10 @@ class _TransactionExtrasSectionState extends State { required ValueChanged onChanged, String? helpText, }) { + final tones = context.tones; return InkWell( onTap: () => onChanged(!value), - borderRadius: BorderRadius.circular(4.r), + borderRadius: BorderRadius.circular(AppRadii.xs.r), child: Row( children: [ SizedBox( @@ -145,6 +143,7 @@ class _TransactionExtrasSectionState extends State { child: Checkbox( value: value, activeColor: widget.accentColor, + side: BorderSide(color: tones.borderMedium, width: 2), materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, onChanged: (v) => onChanged(v ?? false), ), @@ -153,10 +152,10 @@ class _TransactionExtrasSectionState extends State { Flexible( child: Text( label, - style: Theme.of(context) - .textTheme - .bodyMedium - ?.copyWith(fontWeight: FontWeight.w500), + style: Theme.of(context).textTheme.bodyMedium?.copyWith( + fontWeight: FontWeight.w500, + color: tones.textPrimary, + ), ), ), if (helpText != null) ...[ @@ -168,7 +167,7 @@ class _TransactionExtrasSectionState extends State { child: Icon( Icons.help_outline, size: 16.sp, - color: Theme.of(context).hintColor, + color: tones.textMuted, ), ), ], @@ -178,14 +177,15 @@ class _TransactionExtrasSectionState extends State { } Widget _grayCard(BuildContext context, {required Widget child}) { + final tones = context.tones; return Container( width: double.infinity, padding: EdgeInsets.all(12.r), decoration: BoxDecoration( - color: Theme.of(context).colorScheme.surfaceContainerHighest, - borderRadius: BorderRadius.circular(8.r), + color: tones.bgCard, + borderRadius: BorderRadius.circular(AppRadii.md.r), border: Border.all( - color: Theme.of(context).dividerColor.withValues(alpha: 0.2), + color: tones.borderLight, ), ), child: child, @@ -219,6 +219,7 @@ class _TransactionExtrasSectionState extends State { } Widget _refundSection(BuildContext context) { + final tones = context.tones; return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -241,10 +242,13 @@ class _TransactionExtrasSectionState extends State { child: InputDecorator( decoration: InputDecoration( labelText: LocaleKeys.refundOf.tr(), + fillColor: tones.bgSurface, suffixIcon: c.refundOfLabel == null - ? const Icon(Icons.keyboard_arrow_down) + ? Icon(Icons.keyboard_arrow_down, + color: tones.textMuted) : IconButton( - icon: Icon(Icons.clear, size: 20.sp), + icon: Icon(Icons.clear, + size: 20.sp, color: tones.textMuted), onPressed: () => setState(() { c.refundOfClientId = null; c.refundOfLabel = null; @@ -255,9 +259,10 @@ class _TransactionExtrasSectionState extends State { c.refundOfLabel ?? LocaleKeys.searchExpenses.tr(), style: TextStyle( color: c.refundOfLabel != null - ? null - : context.tones.textMuted, + ? tones.textPrimary + : tones.textMuted, fontWeight: FontWeight.w400, + fontSize: 14.sp, ), ), ), @@ -265,7 +270,9 @@ class _TransactionExtrasSectionState extends State { SizedBox(height: 4.h), Text( LocaleKeys.refundOfHint.tr(), - style: Theme.of(context).textTheme.bodySmall, + style: Theme.of(context).textTheme.bodySmall?.copyWith( + color: tones.textSecondary, + ), ), ], ), @@ -277,6 +284,7 @@ class _TransactionExtrasSectionState extends State { } Widget _recurrenceSection(BuildContext context) { + final tones = context.tones; return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -295,13 +303,19 @@ class _TransactionExtrasSectionState extends State { children: [ DropdownButtonFormField( initialValue: c.recurrencePeriod, + dropdownColor: tones.bgSurface, + style: TextStyle(color: tones.textPrimary, fontSize: 14.sp), decoration: InputDecoration( labelText: LocaleKeys.recurrencePeriod.tr(), + fillColor: tones.bgSurface, ), items: const ['daily', 'weekly', 'monthly', 'yearly'] .map((p) => DropdownMenuItem( value: p, - child: Text(_periodLabel(p)), + child: Text( + _periodLabel(p), + style: TextStyle(color: tones.textPrimary), + ), )) .toList(), onChanged: (v) => @@ -311,8 +325,10 @@ class _TransactionExtrasSectionState extends State { TextFormField( controller: c.recurrenceIntervalController, keyboardType: TextInputType.number, + style: TextStyle(color: tones.textPrimary), decoration: InputDecoration( labelText: LocaleKeys.repeatEvery.tr(), + fillColor: tones.bgSurface, ), validator: (v) { if (!c.isRecurring) return null; @@ -326,23 +342,28 @@ class _TransactionExtrasSectionState extends State { SizedBox(height: 12.h), ListTile( contentPadding: EdgeInsets.zero, - title: Text(LocaleKeys.recurrenceEndDate.tr()), + title: Text( + LocaleKeys.recurrenceEndDate.tr(), + style: TextStyle(color: tones.textPrimary, fontSize: 14.sp), + ), subtitle: Text( c.recurrenceEndsAt != null ? _dateFormat.format(c.recurrenceEndsAt!) : LocaleKeys.noEndDate.tr(), + style: TextStyle(color: tones.textSecondary), ), trailing: Row( mainAxisSize: MainAxisSize.min, children: [ if (c.recurrenceEndsAt != null) IconButton( - icon: const Icon(Icons.clear), + icon: Icon(Icons.clear, color: tones.textMuted), onPressed: () => setState(() => c.recurrenceEndsAt = null), ), IconButton( - icon: const Icon(Icons.calendar_today), + icon: + Icon(Icons.calendar_today, color: tones.textMuted), onPressed: () async { final now = DateTime.now(); final picked = await showDatePicker( diff --git a/lib/presentation/utils/custom_auto_complete_search.dart b/lib/presentation/utils/custom_auto_complete_search.dart index e7e4fbbc..cfbe493c 100644 --- a/lib/presentation/utils/custom_auto_complete_search.dart +++ b/lib/presentation/utils/custom_auto_complete_search.dart @@ -6,6 +6,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:trakli/gen/assets.gen.dart'; import 'package:trakli/gen/translations/codegen_loader.g.dart'; +import 'package:trakli/presentation/utils/design_tokens.dart'; class CustomAutoCompleteSearch extends StatefulWidget { final String label; @@ -94,6 +95,7 @@ class _CustomAutoCompleteSearchState } OverlayEntry _createOverlayEntry() { + final tones = context.tones; final renderBox = context.findRenderObject() as RenderBox; final size = renderBox.size; final fieldGlobalY = renderBox.localToGlobal(Offset.zero).dy; @@ -123,11 +125,11 @@ class _CustomAutoCompleteSearchState targetAnchor: openUpward ? Alignment.topLeft : Alignment.bottomLeft, followerAnchor: openUpward ? Alignment.bottomLeft : Alignment.topLeft, child: Material( - color: Theme.of(context).colorScheme.surface, + color: tones.bgSurface, elevation: 4, borderRadius: openUpward - ? BorderRadius.vertical(top: Radius.circular(8.r)) - : BorderRadius.vertical(bottom: Radius.circular(8.r)), + ? BorderRadius.vertical(top: Radius.circular(AppRadii.md.r)) + : BorderRadius.vertical(bottom: Radius.circular(AppRadii.md.r)), child: ConstrainedBox( constraints: BoxConstraints( maxHeight: maxHeight, @@ -141,7 +143,10 @@ class _CustomAutoCompleteSearchState itemBuilder: (context, index) { final T option = _options[index]; return ListTile( - title: Text(widget.displayStringForOption(option)), + title: Text( + widget.displayStringForOption(option), + style: TextStyle(color: tones.textPrimary), + ), onTap: () { _controller.text = widget.displayStringForOption(option); @@ -157,7 +162,10 @@ class _CustomAutoCompleteSearchState onTap: () { _focusNode.unfocus(); }, - title: Text(LocaleKeys.noData.tr()), + title: Text( + LocaleKeys.noData.tr(), + style: TextStyle(color: tones.textPrimary), + ), ), ), ), @@ -176,27 +184,26 @@ class _CustomAutoCompleteSearchState @override Widget build(BuildContext context) { + final tones = context.tones; return CompositedTransformTarget( link: _layerLink, child: Material( - color: _focusNode.hasFocus - ? Colors.white - : Theme.of(context).scaffoldBackgroundColor, + color: _focusNode.hasFocus ? tones.bgSurface : tones.bgPage, elevation: _focusNode.hasFocus ? 4 : 0, borderRadius: BorderRadius.vertical( - top: Radius.circular(8.r), - bottom: Radius.circular(_focusNode.hasFocus ? 0 : 8.r), + top: Radius.circular(AppRadii.md.r), + bottom: Radius.circular(_focusNode.hasFocus ? 0 : AppRadii.md.r), ), child: TextFormField( readOnly: readOnly, controller: _controller, focusNode: _focusNode, validator: widget.validator, + style: TextStyle(color: tones.textPrimary), decoration: InputDecoration( - fillColor: _focusNode.hasFocus - ? Theme.of(context).colorScheme.surface - : null, + fillColor: _focusNode.hasFocus ? tones.bgSurface : null, labelText: widget.label, + labelStyle: TextStyle(color: tones.textSecondary), contentPadding: EdgeInsets.only(top: 16.h), prefixIcon: IconButton( padding: EdgeInsets.zero, @@ -239,35 +246,34 @@ class _CustomAutoCompleteSearchState ), ), focusedBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(10.r), + borderRadius: BorderRadius.circular(AppRadii.lg.r), borderSide: BorderSide( color: widget.accentColor, width: 1.5, ), ), enabledBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(10.r), - borderSide: const BorderSide( - color: Color(0xFFE2E5E9), + borderRadius: BorderRadius.circular(AppRadii.lg.r), + borderSide: BorderSide( + color: tones.borderLight, width: 1, ), ), border: OutlineInputBorder( - borderRadius: BorderRadius.circular(10.r), - borderSide: const BorderSide( - color: Color(0xFFE2E5E9), + borderRadius: BorderRadius.circular(AppRadii.lg.r), + borderSide: BorderSide( + color: tones.borderLight, width: 1, ), ), errorBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(8.r), - borderSide: - BorderSide(color: Theme.of(context).colorScheme.error), + borderRadius: BorderRadius.circular(AppRadii.md.r), + borderSide: BorderSide(color: tones.expense.accent), ), focusedErrorBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(8.r), + borderRadius: BorderRadius.circular(AppRadii.md.r), borderSide: BorderSide( - color: Theme.of(context).colorScheme.error, + color: tones.expense.accent, width: 2.0.w, ), ), diff --git a/lib/presentation/utils/custom_dropdown_search.dart b/lib/presentation/utils/custom_dropdown_search.dart index 7abb13df..755e7217 100644 --- a/lib/presentation/utils/custom_dropdown_search.dart +++ b/lib/presentation/utils/custom_dropdown_search.dart @@ -5,6 +5,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:trakli/gen/assets.gen.dart'; +import 'package:trakli/presentation/utils/design_tokens.dart'; class CustomDropdownSearch extends StatelessWidget { final String label; @@ -36,6 +37,7 @@ class CustomDropdownSearch extends StatelessWidget { @override Widget build(BuildContext context) { + final tones = context.tones; return DropdownSearch( mode: Mode.form, items: items, @@ -48,13 +50,22 @@ class CustomDropdownSearch extends StatelessWidget { suffixProps: DropdownSuffixProps( clearButtonProps: ClearButtonProps(isVisible: showClearButton), ), + dropdownBuilder: (context, selectedItem) { + return Text( + selectedItem == null ? "" : itemAsString(selectedItem), + style: TextStyle( + color: tones.textPrimary, + fontSize: 14.sp, + ), + ); + }, popupProps: PopupProps.menu( searchFieldProps: TextFieldProps( decoration: InputDecoration( hintText: "Search...", - fillColor: Colors.white, + fillColor: tones.bgSurface, focusedBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(8.r), + borderRadius: BorderRadius.circular(AppRadii.md.r), borderSide: BorderSide( color: accentColor, ), @@ -64,20 +75,41 @@ class CustomDropdownSearch extends StatelessWidget { showSearchBox: showSearchBox, fit: FlexFit.loose, menuProps: MenuProps( - backgroundColor: Colors.white, + backgroundColor: tones.bgSurface, shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(8.r), - side: const BorderSide( - color: Colors.grey, + borderRadius: BorderRadius.circular(AppRadii.md.r), + side: BorderSide( + color: tones.borderLight, ), ), popUpAnimationStyle: const AnimationStyle( curve: Curves.decelerate, ), ), + itemBuilder: (context, item, isSelected, isFocused) { + return Container( + padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 12.h), + decoration: BoxDecoration( + color: isSelected ? tones.brand.background : Colors.transparent, + ), + child: Text( + itemAsString(item), + style: TextStyle( + color: isSelected ? tones.brand.deep : tones.textPrimary, + fontSize: 14.sp, + ), + ), + ); + }, ), decoratorProps: DropDownDecoratorProps( + baseStyle: TextStyle( + color: tones.textPrimary, + fontSize: 14.sp, + ), decoration: InputDecoration( + filled: true, + fillColor: tones.bgSurface, contentPadding: showSearchBox ? EdgeInsets.only(top: 16.h) : EdgeInsets.only(top: 16.h, left: 12.w), @@ -104,11 +136,23 @@ class CustomDropdownSearch extends StatelessWidget { ), ), focusedBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(8), + borderRadius: BorderRadius.circular(AppRadii.md.r), borderSide: BorderSide( color: accentColor, ), ), + enabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(AppRadii.md.r), + borderSide: BorderSide( + color: tones.borderLight, + ), + ), + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(AppRadii.md.r), + borderSide: BorderSide( + color: tones.borderLight, + ), + ), ), ), ); diff --git a/lib/presentation/utils/forms/add_transaction_form.dart b/lib/presentation/utils/forms/add_transaction_form.dart index a2192d32..ab500de8 100644 --- a/lib/presentation/utils/forms/add_transaction_form.dart +++ b/lib/presentation/utils/forms/add_transaction_form.dart @@ -22,6 +22,7 @@ import 'package:trakli/presentation/transactions/cubit/transaction_cubit.dart'; import 'package:trakli/presentation/utils/app_navigator.dart'; import 'package:trakli/presentation/utils/bottom_sheets/select_wallet_bottom_sheet.dart'; import 'package:trakli/presentation/utils/custom_dropdown_search.dart'; +import 'package:trakli/presentation/utils/design_tokens.dart'; import 'package:trakli/presentation/utils/dialogs/add_party_dialog.dart'; import 'package:trakli/presentation/utils/enums.dart'; import 'package:trakli/presentation/utils/helpers.dart'; @@ -196,6 +197,7 @@ class _AddTransactionFormState extends State @override Widget build(BuildContext context) { super.build(context); + final tones = context.tones; return SingleChildScrollView( padding: EdgeInsets.symmetric( horizontal: 16.w, @@ -210,6 +212,7 @@ class _AddTransactionFormState extends State LocaleKeys.transactionAmount.tr(), style: Theme.of(context).textTheme.bodyMedium?.copyWith( fontWeight: FontWeight.w500, + color: tones.textPrimary, ), ), SizedBox(height: 8.h), @@ -224,8 +227,9 @@ class _AddTransactionFormState extends State keyboardType: TextInputType.number, decoration: InputDecoration( hintText: LocaleKeys.exampleAmount.tr(), + fillColor: tones.bgSurface, focusedBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(8), + borderRadius: BorderRadius.circular(AppRadii.md.r), borderSide: BorderSide( color: widget.accentColor, ), @@ -252,11 +256,15 @@ class _AddTransactionFormState extends State context: context, theme: CurrencyPickerThemeData( bottomSheetHeight: 0.7.sh, - backgroundColor: Colors.white, + backgroundColor: tones.bgSurface, flagSize: 24.sp, + titleTextStyle: TextStyle( + color: tones.textPrimary, + fontSize: 16.sp, + ), subtitleTextStyle: TextStyle( fontSize: 12.sp, - color: Theme.of(context).primaryColor, + color: tones.textSecondary, )), onSelect: (Currency currencyValue) { setState(() { @@ -272,11 +280,15 @@ class _AddTransactionFormState extends State maxHeight: 50.h, ), decoration: BoxDecoration( - color: Theme.of(context).colorScheme.surface, - borderRadius: BorderRadius.circular(8), + color: tones.bgSurface, + borderRadius: BorderRadius.circular(AppRadii.md.r), + border: Border.all(color: tones.borderLight), ), child: Center( - child: Text(currency?.code ?? "XAF"), + child: Text( + currency?.code ?? "XAF", + style: TextStyle(color: tones.textPrimary), + ), ), ), ) @@ -300,6 +312,7 @@ class _AddTransactionFormState extends State LocaleKeys.wallet.tr(), style: Theme.of(context).textTheme.bodyMedium?.copyWith( fontWeight: FontWeight.w500, + color: tones.textPrimary, ), ), SizedBox(height: 8.h), @@ -315,7 +328,7 @@ class _AddTransactionFormState extends State onTap: () { showCustomBottomSheet( context, - color: Theme.of(context).scaffoldBackgroundColor, + color: tones.bgPage, widget: BlocBuilder( builder: (context, state) { return SelectWalletBottomSheet( @@ -336,8 +349,9 @@ class _AddTransactionFormState extends State }, decoration: InputDecoration( hintText: LocaleKeys.selectWallet.tr(), + fillColor: tones.bgSurface, focusedBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(8), + borderRadius: BorderRadius.circular(AppRadii.md.r), borderSide: BorderSide( color: widget.accentColor, ), @@ -347,7 +361,7 @@ class _AddTransactionFormState extends State child: SvgPicture.asset( Assets.images.arrowDown, colorFilter: ColorFilter.mode( - Colors.grey.shade500, + tones.textMuted, BlendMode.srcIn, ), ), @@ -371,11 +385,12 @@ class _AddTransactionFormState extends State maxHeight: 50.h, ), decoration: BoxDecoration( - color: Theme.of(context).colorScheme.surface, - borderRadius: BorderRadius.circular(8), + color: tones.bgSurface, + borderRadius: BorderRadius.circular(AppRadii.md.r), + border: Border.all(color: tones.borderLight), ), - child: const Center( - child: Icon(Icons.add), + child: Center( + child: Icon(Icons.add, color: tones.textPrimary), ), ), ) @@ -395,6 +410,7 @@ class _AddTransactionFormState extends State LocaleKeys.transactionDate.tr(), style: Theme.of(context).textTheme.bodyMedium?.copyWith( fontWeight: FontWeight.w500, + color: tones.textPrimary, ), overflow: TextOverflow.ellipsis, ), @@ -402,14 +418,19 @@ class _AddTransactionFormState extends State readOnly: true, controller: dateController, decoration: InputDecoration( + fillColor: tones.bgSurface, suffixIcon: Padding( padding: const EdgeInsets.all(12), child: SvgPicture.asset( Assets.images.calendar, + colorFilter: ColorFilter.mode( + tones.textMuted, + BlendMode.srcIn, + ), ), ), focusedBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(8), + borderRadius: BorderRadius.circular(AppRadii.md.r), borderSide: BorderSide( color: widget.accentColor, ), @@ -445,6 +466,7 @@ class _AddTransactionFormState extends State LocaleKeys.transactionTime.tr(), style: Theme.of(context).textTheme.bodyMedium?.copyWith( fontWeight: FontWeight.w500, + color: tones.textPrimary, ), overflow: TextOverflow.ellipsis, ), @@ -452,14 +474,19 @@ class _AddTransactionFormState extends State readOnly: true, controller: timeController, decoration: InputDecoration( + fillColor: tones.bgSurface, suffixIcon: Padding( padding: const EdgeInsets.all(12), child: SvgPicture.asset( Assets.images.clock, + colorFilter: ColorFilter.mode( + tones.textMuted, + BlendMode.srcIn, + ), ), ), focusedBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(8), + borderRadius: BorderRadius.circular(AppRadii.md.r), borderSide: BorderSide( color: widget.accentColor, ), @@ -497,6 +524,7 @@ class _AddTransactionFormState extends State : '${LocaleKeys.transactionReceivedFrom.tr()} (${LocaleKeys.party.tr()})', style: Theme.of(context).textTheme.bodyMedium?.copyWith( fontWeight: FontWeight.w500, + color: tones.textPrimary, ), ), SizedBox(height: 8.h), @@ -544,11 +572,12 @@ class _AddTransactionFormState extends State maxHeight: 50.h, ), decoration: BoxDecoration( - color: Theme.of(context).colorScheme.surface, - borderRadius: BorderRadius.circular(8), + color: tones.bgSurface, + borderRadius: BorderRadius.circular(AppRadii.md.r), + border: Border.all(color: tones.borderLight), ), - child: const Center( - child: Icon(Icons.add), + child: Center( + child: Icon(Icons.add, color: tones.textPrimary), ), ), ), @@ -560,6 +589,7 @@ class _AddTransactionFormState extends State LocaleKeys.transactionCategory.tr(), style: Theme.of(context).textTheme.bodyMedium?.copyWith( fontWeight: FontWeight.w500, + color: tones.textPrimary, ), ), SizedBox(height: 8.h), @@ -617,11 +647,12 @@ class _AddTransactionFormState extends State maxHeight: 50.h, ), decoration: BoxDecoration( - color: Theme.of(context).colorScheme.surface, - borderRadius: BorderRadius.circular(8), + color: tones.bgSurface, + borderRadius: BorderRadius.circular(AppRadii.md.r), + border: Border.all(color: tones.borderLight), ), - child: const Center( - child: Icon(Icons.add), + child: Center( + child: Icon(Icons.add, color: tones.textPrimary), ), ), ), @@ -633,6 +664,7 @@ class _AddTransactionFormState extends State LocaleKeys.transactionDescription.tr(), style: Theme.of(context).textTheme.bodyMedium?.copyWith( fontWeight: FontWeight.w500, + color: tones.textPrimary, ), ), SizedBox(height: 8.h), @@ -640,8 +672,9 @@ class _AddTransactionFormState extends State controller: descriptionController, decoration: InputDecoration( hintText: LocaleKeys.transactionTypeHere.tr(), + fillColor: tones.bgSurface, focusedBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(8), + borderRadius: BorderRadius.circular(AppRadii.md.r), borderSide: BorderSide( color: widget.accentColor, ), @@ -653,6 +686,7 @@ class _AddTransactionFormState extends State LocaleKeys.transactionAttachment.tr(), style: Theme.of(context).textTheme.bodyMedium?.copyWith( fontWeight: FontWeight.w500, + color: tones.textPrimary, ), ), SizedBox(height: 8.h), diff --git a/lib/presentation/utils/theme.dart b/lib/presentation/utils/theme.dart index b0d18c2c..523878e3 100644 --- a/lib/presentation/utils/theme.dart +++ b/lib/presentation/utils/theme.dart @@ -79,6 +79,10 @@ abstract class AppTheme{ color: tones.textSecondary, fontWeight: FontWeight.normal, ), + bodyMedium: TextStyle( + fontSize: 14.sp, + color: tones.textPrimary, + ), bodySmall: TextStyle( fontSize: 12.sp, color: tones.textPrimary, @@ -139,15 +143,15 @@ abstract class AppTheme{ fontWeight: FontWeight.w600, ), border: OutlineInputBorder( - borderRadius: BorderRadius.circular(AppRadii.lg.r), + borderRadius: BorderRadius.circular(AppRadii.md.r), borderSide: BorderSide(color: tones.borderLight, width: 1), ), enabledBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(AppRadii.lg.r), + borderRadius: BorderRadius.circular(AppRadii.md.r), borderSide: BorderSide(color: tones.borderLight, width: 1), ), focusedBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(AppRadii.lg.r), + borderRadius: BorderRadius.circular(AppRadii.md.r), borderSide: BorderSide(color: tones.brand.deep, width: 1.5), ), floatingLabelStyle: TextStyle(