mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-11-30 11:54:22 +01:00
CWA-180 | fixed local date format in dashboard_page, date_section_raw, trade_details_page, transaction_details_page, added currentLocale parameter to settings store
This commit is contained in:
@@ -125,7 +125,9 @@ class DashboardPageBodyState extends State<DashboardPageBody> {
|
||||
final actionListStore = Provider.of<ActionListStore>(context);
|
||||
final syncStore = Provider.of<SyncStore>(context);
|
||||
final settingsStore = Provider.of<SettingsStore>(context);
|
||||
final transactionDateFormat = DateFormat("MMMM d, yyyy HH:mm", settingsStore.languageCode);
|
||||
final transactionDateFormat = settingsStore.currentLocale == 'en_US'
|
||||
? DateFormat("MMMM d, yyyy, HH:mm", settingsStore.languageCode)
|
||||
: DateFormat("d MMMM yyyy, HH:mm", settingsStore.languageCode);
|
||||
|
||||
return Observer(
|
||||
key: _listObserverKey,
|
||||
|
||||
@@ -19,7 +19,9 @@ class DateSectionRaw extends StatelessWidget {
|
||||
nowDate.year == date.year;
|
||||
final settingsStore = Provider.of<SettingsStore>(context);
|
||||
final currentLanguage = settingsStore.languageCode;
|
||||
final dateSectionDateFormat = DateFormat("d MMM", currentLanguage);
|
||||
final dateSectionDateFormat = settingsStore.currentLocale == 'en_US'
|
||||
? DateFormat("MMM d", settingsStore.languageCode)
|
||||
: DateFormat("d MMM", settingsStore.languageCode);
|
||||
var title = "";
|
||||
|
||||
if (isToday) {
|
||||
|
||||
@@ -5,6 +5,7 @@ import 'package:flutter/services.dart';
|
||||
import 'package:flutter_mobx/flutter_mobx.dart';
|
||||
import 'package:cake_wallet/generated/i18n.dart';
|
||||
import 'package:cake_wallet/src/stores/exchange_trade/exchange_trade_store.dart';
|
||||
import 'package:cake_wallet/src/stores/settings/settings_store.dart';
|
||||
import 'package:cake_wallet/src/screens/base_page.dart';
|
||||
import 'package:cake_wallet/src/screens/transaction_details/standart_list_item.dart';
|
||||
import 'package:cake_wallet/src/screens/transaction_details/standart_list_row.dart';
|
||||
@@ -17,11 +18,13 @@ class TradeDetailsPage extends BasePage {
|
||||
@override
|
||||
bool get isModalBackButton => true;
|
||||
|
||||
final createdAtFormat = DateFormat('yyyy-MM-dd HH:mm:ss');
|
||||
|
||||
@override
|
||||
Widget body(BuildContext context) {
|
||||
final exchangeStore = Provider.of<ExchangeTradeStore>(context);
|
||||
final settingsStore = Provider.of<SettingsStore>(context);
|
||||
final createdAtFormat = settingsStore.currentLocale == 'en_US'
|
||||
? DateFormat('yyyy.MM.dd, HH:mm')
|
||||
: DateFormat('dd.MM.yyyy, HH:mm');
|
||||
|
||||
return Container(
|
||||
padding: EdgeInsets.only(top: 10.0, bottom: 10.0, left: 20, right: 15),
|
||||
|
||||
@@ -42,11 +42,13 @@ class TransactionDetailsForm extends StatefulWidget {
|
||||
}
|
||||
|
||||
class TransactionDetailsFormState extends State<TransactionDetailsForm> {
|
||||
final DateFormat _dateFormat = DateFormat('dd.MM.yyyy, HH:mm');
|
||||
final _items = List<StandartListItem>();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
final _dateFormat = widget.settingsStore.currentLocale == 'en_US'
|
||||
? DateFormat('yyyy.MM.dd, HH:mm')
|
||||
: DateFormat('dd.MM.yyyy, HH:mm');
|
||||
final items = [
|
||||
StandartListItem(
|
||||
title: S.current.transaction_details_transaction_id,
|
||||
|
||||
Reference in New Issue
Block a user