Skip to content

Commit

Permalink
Correct colors
Browse files Browse the repository at this point in the history
  • Loading branch information
Carapacik committed Nov 14, 2023
1 parent c9133cd commit e5fa385
Show file tree
Hide file tree
Showing 10 changed files with 121 additions and 118 deletions.
9 changes: 4 additions & 5 deletions lib/src/core/localization/generated/intl/messages_all.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import 'messages_en.dart' as messages_en;
import 'messages_ru.dart' as messages_ru;

typedef Future<dynamic> LibraryLoader();

Map<String, LibraryLoader> _deferredLibraries = {
'en': () => new SynchronousFuture(null),
'ru': () => new SynchronousFuture(null),
Expand All @@ -38,9 +39,8 @@ MessageLookupByLibrary? _findExact(String localeName) {

/// User programs should call this before using [localeName] for messages.
Future<bool> initializeMessages(String localeName) {
var availableLocale = Intl.verifiedLocale(
localeName, (locale) => _deferredLibraries[locale] != null,
onFailure: (_) => null);
var availableLocale =
Intl.verifiedLocale(localeName, (locale) => _deferredLibraries[locale] != null, onFailure: (_) => null);
if (availableLocale == null) {
return new SynchronousFuture(false);
}
Expand All @@ -60,8 +60,7 @@ bool _messagesExistFor(String locale) {
}

MessageLookupByLibrary? _findGeneratedMessagesFor(String locale) {
var actualLocale =
Intl.verifiedLocale(locale, _messagesExistFor, onFailure: (_) => null);
var actualLocale = Intl.verifiedLocale(locale, _messagesExistFor, onFailure: (_) => null);
if (actualLocale == null) return null;
return _findExact(actualLocale);
}
20 changes: 8 additions & 12 deletions lib/src/core/localization/generated/intl/messages_en.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,30 +23,28 @@ class MessageLookup extends MessageLookupByLibrary {
static String m0(number) => "Level ${number}";

final messages = _notInlinedMessages(_notInlinedMessages);

static Map<String, Function> _notInlinedMessages(_) => <String, Function>{
"about": MessageLookupByLibrary.simpleMessage("About"),
"appDictionary": MessageLookupByLibrary.simpleMessage("App dictionary"),
"appLanguage": MessageLookupByLibrary.simpleMessage("App language"),
"appTitle": MessageLookupByLibrary.simpleMessage("Wordly Plus"),
"casual": MessageLookupByLibrary.simpleMessage("Default"),
"colorMode": MessageLookupByLibrary.simpleMessage("Color mode"),
"currentStreak":
MessageLookupByLibrary.simpleMessage("Current\nStreak"),
"currentStreak": MessageLookupByLibrary.simpleMessage("Current\nStreak"),
"daily": MessageLookupByLibrary.simpleMessage("Daily"),
"en": MessageLookupByLibrary.simpleMessage("English"),
"guessDistribution":
MessageLookupByLibrary.simpleMessage("Guess distribution"),
"guessDistribution": MessageLookupByLibrary.simpleMessage("Guess distribution"),
"highContrast": MessageLookupByLibrary.simpleMessage("High contrast"),
"levelNumber": m0,
"levels": MessageLookupByLibrary.simpleMessage("Levels"),
"loseMessage": MessageLookupByLibrary.simpleMessage("You lost"),
"maxStreak": MessageLookupByLibrary.simpleMessage("Max\nStreak"),
"message_new_word": MessageLookupByLibrary.simpleMessage(
"subject=Wordle%20-%20New%20word&body=Word%20-%0AMeaning%20-"),
"message_new_word":
MessageLookupByLibrary.simpleMessage("subject=Wordle%20-%20New%20word&body=Word%20-%0AMeaning%20-"),
"nextLevel": MessageLookupByLibrary.simpleMessage("Next level"),
"nextWord": MessageLookupByLibrary.simpleMessage("Next wordle in"),
"notPlayed": MessageLookupByLibrary.simpleMessage(
"You haven\'t played a single game"),
"notPlayed": MessageLookupByLibrary.simpleMessage("You haven\'t played a single game"),
"other": MessageLookupByLibrary.simpleMessage("Other"),
"played": MessageLookupByLibrary.simpleMessage("Played"),
"ru": MessageLookupByLibrary.simpleMessage("Russian"),
Expand All @@ -64,9 +62,7 @@ class MessageLookup extends MessageLookupByLibrary {
"viewStatistic": MessageLookupByLibrary.simpleMessage("View statistic"),
"winMessage": MessageLookupByLibrary.simpleMessage("You win!"),
"winRate": MessageLookupByLibrary.simpleMessage("Win\nrate"),
"wordNotFound": MessageLookupByLibrary.simpleMessage(
"Word not found in dictionary"),
"wordTooShort":
MessageLookupByLibrary.simpleMessage("Word is not correct length")
"wordNotFound": MessageLookupByLibrary.simpleMessage("Word not found in dictionary"),
"wordTooShort": MessageLookupByLibrary.simpleMessage("Word is not correct length")
};
}
26 changes: 10 additions & 16 deletions lib/src/core/localization/generated/intl/messages_ru.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class MessageLookup extends MessageLookupByLibrary {
static String m0(number) => "Уровень ${number}";

final messages = _notInlinedMessages(_notInlinedMessages);

static Map<String, Function> _notInlinedMessages(_) => <String, Function>{
"about": MessageLookupByLibrary.simpleMessage("О приложении"),
"appDictionary": MessageLookupByLibrary.simpleMessage("Язык словаря"),
Expand All @@ -33,21 +34,17 @@ class MessageLookup extends MessageLookupByLibrary {
"currentStreak": MessageLookupByLibrary.simpleMessage("Текущая\nСерия"),
"daily": MessageLookupByLibrary.simpleMessage("Ежедневный"),
"en": MessageLookupByLibrary.simpleMessage("Английский"),
"guessDistribution":
MessageLookupByLibrary.simpleMessage("Распределение догадок"),
"highContrast":
MessageLookupByLibrary.simpleMessage("Высокий контраст"),
"guessDistribution": MessageLookupByLibrary.simpleMessage("Распределение догадок"),
"highContrast": MessageLookupByLibrary.simpleMessage("Высокий контраст"),
"levelNumber": m0,
"levels": MessageLookupByLibrary.simpleMessage("Уровни"),
"loseMessage": MessageLookupByLibrary.simpleMessage("Вы проиграли"),
"maxStreak": MessageLookupByLibrary.simpleMessage("Макс.\nСерия"),
"message_new_word": MessageLookupByLibrary.simpleMessage(
"subject=Словень%20-%20Новое%20слово&body=Слово%20-%0AЗначение%20-"),
"message_new_word":
MessageLookupByLibrary.simpleMessage("subject=Словень%20-%20Новое%20слово&body=Слово%20-%0AЗначение%20-"),
"nextLevel": MessageLookupByLibrary.simpleMessage("Следующий уровень"),
"nextWord":
MessageLookupByLibrary.simpleMessage("Следующее слово через"),
"notPlayed":
MessageLookupByLibrary.simpleMessage("Вы не сыграли ни одной игры"),
"nextWord": MessageLookupByLibrary.simpleMessage("Следующее слово через"),
"notPlayed": MessageLookupByLibrary.simpleMessage("Вы не сыграли ни одной игры"),
"other": MessageLookupByLibrary.simpleMessage("Другой"),
"played": MessageLookupByLibrary.simpleMessage("Сыграно"),
"ru": MessageLookupByLibrary.simpleMessage("Русский"),
Expand All @@ -62,13 +59,10 @@ class MessageLookup extends MessageLookupByLibrary {
"themeSystem": MessageLookupByLibrary.simpleMessage("Системная"),
"tutorial": MessageLookupByLibrary.simpleMessage("Как играть"),
"viewLevels": MessageLookupByLibrary.simpleMessage("Посмотреть уровни"),
"viewStatistic":
MessageLookupByLibrary.simpleMessage("Посмотреть статистику"),
"viewStatistic": MessageLookupByLibrary.simpleMessage("Посмотреть статистику"),
"winMessage": MessageLookupByLibrary.simpleMessage("Вы победили!"),
"winRate": MessageLookupByLibrary.simpleMessage("Показатель\nпобед"),
"wordNotFound":
MessageLookupByLibrary.simpleMessage("Слово не найдено в словаре"),
"wordTooShort":
MessageLookupByLibrary.simpleMessage("Слово неправильной длины")
"wordNotFound": MessageLookupByLibrary.simpleMessage("Слово не найдено в словаре"),
"wordTooShort": MessageLookupByLibrary.simpleMessage("Слово неправильной длины")
};
}
16 changes: 7 additions & 9 deletions lib/src/core/localization/generated/l10n.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion lib/src/feature/about/widget/about_page.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
import 'package:flutter/material.dart';
import 'package:wordly/src/core/utils/extensions/extensions.dart';

class AboutPage extends StatelessWidget {
const AboutPage({super.key});

@override
Widget build(BuildContext context) {
return const Scaffold();
return Title(
color: Colors.black,
title: context.r.about,
child: Scaffold(
appBar: AppBar(),
),
);
}
}
7 changes: 4 additions & 3 deletions lib/src/feature/game/widget/game_result_dialog.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:wordly/src/core/resources/resources.dart';
import 'package:wordly/src/core/utils/extensions/extensions.dart';
import 'package:wordly/src/feature/game/model/game_mode.dart';
import 'package:wordly/src/feature/game/widget/countdown_timer.dart';
Expand Down Expand Up @@ -48,7 +49,7 @@ class DialogContent extends StatelessWidget {
final width = MediaQuery.sizeOf(context).width;
final padding = width > 350 ? (width - 350) / 2 : 8;
return Dialog(
backgroundColor: isWin ? Colors.green : Colors.red,
backgroundColor: isWin ? AppColors.green : AppColors.red,
insetAnimationDuration: const Duration(milliseconds: 800),
insetPadding: EdgeInsets.symmetric(horizontal: padding.toDouble()),
child: Padding(
Expand Down Expand Up @@ -114,7 +115,7 @@ class _DailyContent extends StatelessWidget {
child: Text(
context.r.share,
style: context.theme.blb.copyWith(
color: isWin ? Colors.green : Colors.red,
color: isWin ? AppColors.green : AppColors.red,
),
textAlign: TextAlign.center,
),
Expand Down Expand Up @@ -149,7 +150,7 @@ class _LevelContent extends StatelessWidget {
child: Text(
context.r.nextLevel,
style: context.theme.blb.copyWith(
color: isWin ? Colors.green : Colors.red,
color: isWin ? AppColors.green : AppColors.red,
),
textAlign: TextAlign.center,
),
Expand Down
2 changes: 0 additions & 2 deletions lib/src/feature/game/widget/keyboard_by_language.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import 'dart:math' as math show pi;

import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:wordly/src/feature/app/widget/dictionary_scope.dart';
Expand Down
3 changes: 2 additions & 1 deletion lib/src/feature/level/widget/level_dialog.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:wordly/src/core/resources/resources.dart';
import 'package:wordly/src/core/utils/extensions/extensions.dart';

Future<void> showLevelDialog(
Expand All @@ -13,7 +14,7 @@ Future<void> showLevelDialog(
final width = MediaQuery.sizeOf(context).width;
final padding = width > 350 ? (width - 350) / 2 : 8;
return Dialog(
backgroundColor: isWin ? Colors.green : Colors.red,
backgroundColor: isWin ? AppColors.green : AppColors.red,
insetAnimationDuration: const Duration(milliseconds: 800),
insetPadding: EdgeInsets.symmetric(horizontal: padding.toDouble()),
child: Padding(
Expand Down
Loading

0 comments on commit e5fa385

Please sign in to comment.