Skip to content

Commit

Permalink
Credits about page
Browse files Browse the repository at this point in the history
  • Loading branch information
Carapacik committed Nov 29, 2023
1 parent 288f90f commit bb77c06
Show file tree
Hide file tree
Showing 19 changed files with 233 additions and 50 deletions.
11 changes: 11 additions & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<queries>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="https" />
</intent>
<intent>
<action android:name="android.intent.action.SEND" />
<data android:mimeType="*/*" />
</intent>
</queries>

<application
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher"
Expand Down
6 changes: 6 additions & 0 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,16 @@ PODS:
- shared_preferences_foundation (0.0.1):
- Flutter
- FlutterMacOS
- url_launcher_ios (0.0.1):
- Flutter

DEPENDENCIES:
- Flutter (from `Flutter`)
- flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- share_plus (from `.symlinks/plugins/share_plus/ios`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)

EXTERNAL SOURCES:
Flutter:
Expand All @@ -29,13 +32,16 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/share_plus/ios"
shared_preferences_foundation:
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
url_launcher_ios:
:path: ".symlinks/plugins/url_launcher_ios/ios"

SPEC CHECKSUMS:
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
share_plus: c3fef564749587fc939ef86ffb283ceac0baf9f5
shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126
url_launcher_ios: bf5ce03e0e2088bad9cc378ea97fa0ed5b49673b

PODFILE CHECKSUM: ec8b70a489dd1f81e53ef185cf7ad30fce8f8d00

Expand Down
5 changes: 5 additions & 0 deletions ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@
<true/>
<key>UIStatusBarHidden</key>
<false/>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>https</string>
<string>mailto</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
Expand Down
4 changes: 4 additions & 0 deletions lib/src/core/constants/constants.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
const maxMobileWidth = 768.0;

const email = '[email protected]';

const webLink = 'https://carapacik.github.io/WordlyPlus/';

const androidLink = 'https://play.google.com/store/apps/details?id=com.carapacik.wordly';
4 changes: 4 additions & 0 deletions lib/src/core/localization/generated/intl/messages_en.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ class MessageLookup extends MessageLookupByLibrary {
"checkResultLose": m0,
"checkResultWin": m1,
"colorMode": MessageLookupByLibrary.simpleMessage("Color mode"),
"contact": MessageLookupByLibrary.simpleMessage(
"If you didn\'t find a word in the dictionary or it has the wrong definition,\nwrite to us, we will add it\nin the next update.\n"),
"currentStreak":
MessageLookupByLibrary.simpleMessage("Current\nStreak"),
"daily": MessageLookupByLibrary.simpleMessage("Daily"),
Expand All @@ -59,6 +61,8 @@ class MessageLookup extends MessageLookupByLibrary {
"played": MessageLookupByLibrary.simpleMessage("Played"),
"ru": MessageLookupByLibrary.simpleMessage("Russian"),
"secretWord": MessageLookupByLibrary.simpleMessage("Secret word"),
"sendMessage": MessageLookupByLibrary.simpleMessage(
"subject=WordlyPlus%20-%20New%20word&body=Word%20-%0AMeaning%20-"),
"settings": MessageLookupByLibrary.simpleMessage("Settings"),
"share": MessageLookupByLibrary.simpleMessage("Share"),
"start": MessageLookupByLibrary.simpleMessage("Start game"),
Expand Down
4 changes: 4 additions & 0 deletions lib/src/core/localization/generated/intl/messages_ru.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ class MessageLookup extends MessageLookupByLibrary {
"checkResultLose": m0,
"checkResultWin": m1,
"colorMode": MessageLookupByLibrary.simpleMessage("Цветовой режим"),
"contact": MessageLookupByLibrary.simpleMessage(
"Если вы не нашли слово в словаре или оно имеет неправильное определение,\nнапишите нам, мы добавим его\nв следующем обновлении.\n"),
"currentStreak": MessageLookupByLibrary.simpleMessage("Текущая\nСерия"),
"daily": MessageLookupByLibrary.simpleMessage("Ежедневный"),
"en": MessageLookupByLibrary.simpleMessage("Английский"),
Expand All @@ -60,6 +62,8 @@ class MessageLookup extends MessageLookupByLibrary {
"played": MessageLookupByLibrary.simpleMessage("Сыграно"),
"ru": MessageLookupByLibrary.simpleMessage("Русский"),
"secretWord": MessageLookupByLibrary.simpleMessage("Загаданное слово"),
"sendMessage": MessageLookupByLibrary.simpleMessage(
"subject=WordlyPlus%20-%20Новое%20слово&body=Слово%20-%0AЗначение%20-"),
"settings": MessageLookupByLibrary.simpleMessage("Настройки"),
"share": MessageLookupByLibrary.simpleMessage("Поделиться"),
"start": MessageLookupByLibrary.simpleMessage("Начать играть"),
Expand Down
20 changes: 20 additions & 0 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.

2 changes: 2 additions & 0 deletions lib/src/core/localization/translations/intl_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"checkResultLose": "I couldn't guess the word in {attemptNumber} attempts.",
"checkResultWin": "The word is solved in {attemptNumber}/6 attempts.",
"colorMode": "Color mode",
"contact": "If you didn't find a word in the dictionary or it has the wrong definition,\nwrite to us, we will add it\nin the next update.\n",
"currentStreak": "Current\nStreak",
"daily": "Daily",
"en": "English",
Expand All @@ -28,6 +29,7 @@
"played": "Played",
"ru": "Russian",
"secretWord": "Secret word",
"sendMessage": "subject=WordlyPlus%20-%20New%20word&body=Word%20-%0AMeaning%20-",
"settings": "Settings",
"share": "Share",
"start": "Start game",
Expand Down
2 changes: 2 additions & 0 deletions lib/src/core/localization/translations/intl_ru.arb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"checkResultLose": "У меня не получилось разгадать слово за {attemptNumber} попыток.",
"checkResultWin": "Я угадал слово за {attemptNumber}/6 попыток.",
"colorMode": "Цветовой режим",
"contact": "Если вы не нашли слово в словаре или оно имеет неправильное определение,\nнапишите нам, мы добавим его\nв следующем обновлении.\n",
"currentStreak": "Текущая\nСерия",
"daily": "Ежедневный",
"en": "Английский",
Expand All @@ -28,6 +29,7 @@
"played": "Сыграно",
"ru": "Русский",
"secretWord": "Загаданное слово",
"sendMessage": "subject=WordlyPlus%20-%20Новое%20слово&body=Слово%20-%0AЗначение%20-",
"settings": "Настройки",
"share": "Поделиться",
"start": "Начать играть",
Expand Down
74 changes: 74 additions & 0 deletions lib/src/feature/about/widget/about_page.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import 'package:flutter/material.dart';
import 'package:url_launcher/link.dart';
import 'package:wordly/src/core/constants/constants.dart';
import 'package:wordly/src/core/utils/extensions/extensions.dart';
import 'package:wordly/src/feature/components/widget/constraint_screen.dart';

class AboutPage extends StatelessWidget {
const AboutPage({super.key});
Expand All @@ -17,7 +20,78 @@ class AboutPage extends StatelessWidget {
style: const TextStyle(fontWeight: FontWeight.w700, fontSize: 32),
),
),
body: ConstraintScreen(
child: Column(
children: [
const Spacer(),
const Text('Game', style: TextStyle(fontSize: 24, fontWeight: FontWeight.w700)),
const _CreditNameText(text: 'Carapacik', url: 'https://carapacik.github.io/'),
const _CreditNameText(text: 'Dmitriy Lukyanov (Design)', url: 'https://t.me/kamalledln'),
const Spacer(flex: 3),
Link(
uri: Uri.parse(
'mailto:$email?'
'${context.r.sendMessage}',
),
builder: (context, followLink) => MouseRegion(
cursor: SystemMouseCursors.click,
child: GestureDetector(
onTap: followLink,
child: RichText(
textAlign: TextAlign.center,
text: TextSpan(
children: [
TextSpan(
text: context.r.contact,
style: const TextStyle(fontSize: 16),
),
const WidgetSpan(
child: SelectableText(
email,
style: TextStyle(
decoration: TextDecoration.underline,
fontWeight: FontWeight.w700,
fontSize: 24,
),
),
),
],
),
),
),
),
),
const Spacer(),
],
),
),
),
);
}
}

class _CreditNameText extends StatelessWidget {
const _CreditNameText({
required this.text,
required this.url,
});

final String text;
final String url;

@override
Widget build(BuildContext context) => Link(
uri: Uri.parse(url),
builder: (context, followLink) => MouseRegion(
cursor: SystemMouseCursors.click,
child: GestureDetector(
onTap: followLink,
behavior: HitTestBehavior.opaque,
child: Text(
text,
style: const TextStyle(fontSize: 20, decoration: TextDecoration.underline),
),
),
),
);
}
7 changes: 3 additions & 4 deletions lib/src/feature/game/data/game_repository.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import 'dart:ui' show Locale;

import 'package:flutter/services.dart' show rootBundle;
import 'package:intl/intl.dart' show DateFormat;
import 'package:wordly/src/core/assets/generated/assets.gen.dart';
import 'package:wordly/src/core/utils/logger.dart';
import 'package:wordly/src/feature/game/data/game_datasource.dart';
import 'package:wordly/src/feature/game/model/game_result.dart';
Expand Down Expand Up @@ -34,11 +35,9 @@ final class GameRepository implements IGameRepository {

@override
Future<void> init() async {
final rawDictionaryRu =
await rootBundle.loadString('assets/dictionary/ru.json').then(json.decode) as Map<String, dynamic>;
final rawDictionaryRu = await rootBundle.loadString(Assets.dictionary.ru).then(json.decode) as Map<String, dynamic>;
_ruDictionary = rawDictionaryRu.map((key, value) => MapEntry(key, value.toString()));
final rawDictionaryEn =
await rootBundle.loadString('assets/dictionary/en.json').then(json.decode) as Map<String, dynamic>;
final rawDictionaryEn = await rootBundle.loadString(Assets.dictionary.en).then(json.decode) as Map<String, dynamic>;
_enDictionary = rawDictionaryEn.map((key, value) => MapEntry(key, value.toString()));
}

Expand Down
90 changes: 47 additions & 43 deletions lib/src/feature/game/widget/game_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,53 +66,57 @@ class _GamePageState extends State<GamePage> {
context.read<GameBloc>().add(GameEvent.listenKeyEvent(event));
}
},
child: Scaffold(
appBar: AppBar(
centerTitle: true,
title: BlocBuilder<GameBloc, GameState>(
builder: (context, state) => Text(
state.gameMode == GameMode.daily ? context.r.daily : context.r.levelNumber(state.lvlNumber ?? 1),
style: const TextStyle(fontWeight: FontWeight.w700, fontSize: 32),
child: Title(
color: Colors.black,
title: context.r.appTitle,
child: Scaffold(
appBar: AppBar(
centerTitle: true,
title: BlocBuilder<GameBloc, GameState>(
builder: (context, state) => Text(
state.gameMode == GameMode.daily ? context.r.daily : context.r.levelNumber(state.lvlNumber ?? 1),
style: const TextStyle(fontWeight: FontWeight.w700, fontSize: 32),
),
),
),
actions: [
BlocBuilder<GameBloc, GameState>(
builder: (context, state) {
if (state.gameMode == GameMode.daily) {
return IconButton(
tooltip: context.r.viewStatistic,
icon: const Icon(Icons.leaderboard),
onPressed: () async {
await Navigator.of(context).push(
MaterialPageRoute<void>(
builder: (context) => StatisticPage(
dictionary: SettingsScope.dictionaryOf(context).dictionary,
actions: [
BlocBuilder<GameBloc, GameState>(
builder: (context, state) {
if (state.gameMode == GameMode.daily) {
return IconButton(
tooltip: context.r.viewStatistic,
icon: const Icon(Icons.leaderboard),
onPressed: () async {
await Navigator.of(context).push(
MaterialPageRoute<void>(
builder: (context) => StatisticPage(
dictionary: SettingsScope.dictionaryOf(context).dictionary,
),
),
),
);
},
);
} else {
return IconButton(
tooltip: context.r.viewLevels,
icon: const Icon(Icons.apps),
onPressed: () async {
await Navigator.of(context).push(
MaterialPageRoute<void>(
builder: (context) => LevelPage(
dictionary: SettingsScope.dictionaryOf(context).dictionary,
);
},
);
} else {
return IconButton(
tooltip: context.r.viewLevels,
icon: const Icon(Icons.apps),
onPressed: () async {
await Navigator.of(context).push(
MaterialPageRoute<void>(
builder: (context) => LevelPage(
dictionary: SettingsScope.dictionaryOf(context).dictionary,
),
),
),
);
},
);
}
},
),
],
);
},
);
}
},
),
],
),
drawer: const CustomDrawer(),
body: const GameBody(),
),
drawer: const CustomDrawer(),
body: const GameBody(),
),
);
}
Expand Down
2 changes: 2 additions & 0 deletions macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ import Foundation
import path_provider_foundation
import share_plus
import shared_preferences_foundation
import url_launcher_macos

func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin"))
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
}
Loading

0 comments on commit bb77c06

Please sign in to comment.