Compare commits
21 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
fef467544d
|
|||
|
6b0a0a3b04
|
|||
|
b9af589236
|
|||
|
60d177577c
|
|||
|
40846558aa
|
|||
|
116d15db1c
|
|||
|
14b8fe604d
|
|||
|
55fa81dfa8
|
|||
|
c39bf9df87
|
|||
|
f89b233893
|
|||
|
8a98f28ff4
|
|||
|
1619451191
|
|||
|
3f7d1e916d
|
|||
|
815c2f4d44
|
|||
|
e489a24a96
|
|||
|
c09b82f90b
|
|||
|
b5ec27a90b
|
|||
|
9278a74219
|
|||
|
37ea8448cb
|
|||
|
4a7b28ad68
|
|||
|
8db44d98b5
|
2
.gitignore
vendored
2
.gitignore
vendored
@@ -14,6 +14,8 @@
|
||||
/android/app/profile
|
||||
/android/app/release
|
||||
|
||||
/android/build/reports
|
||||
|
||||
# -----------------------------
|
||||
|
||||
# Nix build results
|
||||
|
||||
@@ -11,12 +11,12 @@ android {
|
||||
ndkVersion = flutter.ndkVersion
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = JavaVersion.VERSION_1_8
|
||||
jvmTarget = JavaVersion.VERSION_17
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<application
|
||||
android:label="@string/app_name"
|
||||
android:enableOnBackInvokedCallback="true"
|
||||
/>
|
||||
|
||||
<!-- The INTERNET permission is required for development. Specifically,
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
<application
|
||||
android:label="@string/app_name"
|
||||
android:name="${applicationName}"
|
||||
android:icon="@mipmap/launcher_icon"
|
||||
android:enableOnBackInvokedCallback="true">
|
||||
android:icon="@mipmap/launcher_icon">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="true"
|
||||
@@ -12,7 +11,6 @@
|
||||
android:theme="@style/LaunchTheme"
|
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
||||
android:hardwareAccelerated="true"
|
||||
android:enableOnBackInvokedCallback="true"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
<!-- Specifies an Android theme to apply to this Activity as soon as
|
||||
the Android process has started. This theme is visible to the user
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
@@ -18,8 +18,8 @@ pluginManagement {
|
||||
|
||||
plugins {
|
||||
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
|
||||
id "com.android.application" version "8.3.0" apply false
|
||||
id "org.jetbrains.kotlin.android" version "1.9.20" apply false
|
||||
id "com.android.application" version "8.13.2" apply false
|
||||
id "org.jetbrains.kotlin.android" version "2.3.0" apply false
|
||||
}
|
||||
|
||||
include ":app"
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,4 +1,12 @@
|
||||
{
|
||||
"droid-fonts": "assets/licenses/droid-fonts.txt",
|
||||
"noto-fonts": "assets/licenses/noto-fonts.txt"
|
||||
}
|
||||
"droid-sans-japanese": "assets/licenses/apache-2.0.txt",
|
||||
"hina-mincho": "assets/licenses/ofl-1.1.txt",
|
||||
"ibm-plex-sans-japanese": "assets/licenses/ofl-1.1.txt",
|
||||
"klee-one": "assets/licenses/ofl-1.1.txt",
|
||||
"kosugi": "assets/licenses/apache-2.0.txt",
|
||||
"m-plus-2": "assets/licenses/ofl-1.1.txt",
|
||||
"m-plus-rounded-1c": "assets/licenses/ofl-1.1.txt",
|
||||
"noto-sans-japanese": "assets/licenses/ofl-1.1.txt",
|
||||
"noto-serif-japanese": "assets/licenses/ofl-1.1.txt",
|
||||
"zen-kurenaido": "assets/licenses/ofl-1.1.txt"
|
||||
}
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
Copyright 2018 The Noto Project Authors (github.com/googlei18n/noto-fonts)
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License,
|
||||
Version 1.1.
|
||||
Copyright (c) [year] [fullname] ([email])
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
@@ -12,10 +10,10 @@ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font
|
||||
creation efforts of academic and linguistic communities, and to
|
||||
provide a free and open framework in which fonts may be shared and
|
||||
improved in partnership with others.
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
@@ -23,8 +21,8 @@ fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply to
|
||||
any document created using the fonts or their derivatives.
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
@@ -34,25 +32,25 @@ include source files, build scripts and documentation.
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software
|
||||
components as distributed by the Copyright Holder(s).
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to,
|
||||
deleting, or substituting -- in part or in whole -- any of the
|
||||
components of the Original Version, by changing formats or by porting
|
||||
the Font Software to a new environment.
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
PERMISSION AND CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed,
|
||||
modify, redistribute, and sell modified and unmodified copies of the
|
||||
Font Software, subject to the following conditions:
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components, in
|
||||
Original or Modified Versions, may be sold by itself.
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
@@ -62,9 +60,9 @@ in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the
|
||||
corresponding Copyright Holder. This restriction only applies to the
|
||||
primary font name as presented to the users.
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
@@ -75,8 +73,8 @@ permission.
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created using
|
||||
the Font Software.
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
@@ -91,4 +89,4 @@ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
20
docs/changelog/v0.5.0 - 2025-12-19.md
Normal file
20
docs/changelog/v0.5.0 - 2025-12-19.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# v0.5.0 - 2025-12-19
|
||||
|
||||
A relatively small update, pushing out some features that have been laying ready on the main branch for a while.
|
||||
|
||||
## New features ✨
|
||||
|
||||
- Added search count bubbles to the history entries.
|
||||
- Added the search term to the appbar when viewing search results.
|
||||
|
||||
## Changes 🔧
|
||||
|
||||
- Enable automatic theme by default, following system settings.
|
||||
- Use hiragana for both kunyomi and onyomi in kanji search results.
|
||||
- Provide the existing content from the searchbar as context to the kanji drawing recognition model, likely improving suggestions.
|
||||
- Removed [Predictive Back](https://developer.android.com/design/ui/mobile/guides/patterns/predictive-back) support, due to weird "go to the previous page" behaviour on some devices.
|
||||
|
||||
## Other 📝
|
||||
|
||||
- Updated flutter: `3.32` -> `3.35`
|
||||
- Updated dictionary data
|
||||
6
flake.lock
generated
6
flake.lock
generated
@@ -2,11 +2,11 @@
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1752480373,
|
||||
"narHash": "sha256-JHQbm+OcGp32wAsXTE/FLYGNpb+4GLi5oTvCxwSoBOA=",
|
||||
"lastModified": 1771369470,
|
||||
"narHash": "sha256-0NBlEBKkN3lufyvFegY4TYv5mCNHbi5OmBDrzihbBMQ=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "62e0f05ede1da0d54515d4ea8ce9c733f12d9f08",
|
||||
"rev": "0182a361324364ae3f436a63005877674cf45efb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
38
flake.nix
38
flake.nix
@@ -16,40 +16,36 @@
|
||||
android_sdk.accept_license = true;
|
||||
allowUnfree = true;
|
||||
};
|
||||
overlays = [
|
||||
# https://github.com/NixOS/nixpkgs/issues/425323
|
||||
(final: prev: {
|
||||
jdk8 = prev.jdk8.overrideAttrs {
|
||||
separateDebugInfo = false;
|
||||
__structuredAttrs = false;
|
||||
};
|
||||
})
|
||||
];
|
||||
};
|
||||
androidSdk = (pkgs.androidenv.composeAndroidPackages {
|
||||
buildToolsVersions = [ "33.0.1" "34.0.0" ];
|
||||
platformVersions = [ "35" "34" ];
|
||||
androidPkgs = (pkgs.androidenv.composeAndroidPackages {
|
||||
buildToolsVersions = [ "35.0.0" "36.1.0" ];
|
||||
platformVersions = [ "35" "36" ];
|
||||
abiVersions = [ "armeabi-v7a" "arm64-v8a" ];
|
||||
cmakeVersions = [ "3.22.1" ];
|
||||
includeNDK = true;
|
||||
ndkVersions = [ "26.3.11579264" ];
|
||||
}).androidsdk;
|
||||
in f system pkgs androidSdk);
|
||||
ndkVersions = [ "28.2.13676358" ];
|
||||
});
|
||||
in f system pkgs androidPkgs);
|
||||
in {
|
||||
devShells = forAllSystems (_: pkgs: androidSdk: {
|
||||
devShells = forAllSystems (_: pkgs: androidPkgs: {
|
||||
default = let
|
||||
flutter' = pkgs.flutter;
|
||||
jdk' = pkgs.jdk17;
|
||||
flutter' = pkgs.flutter341;
|
||||
jdk' = pkgs.jdk21;
|
||||
in pkgs.mkShell {
|
||||
packages = [
|
||||
flutter'
|
||||
pkgs.sqlite-interactive
|
||||
androidSdk
|
||||
androidPkgs.androidsdk
|
||||
jdk'
|
||||
];
|
||||
env = {
|
||||
ANDROID_SDK_ROOT = "${androidSdk}/libexec/android-sdk";
|
||||
GRADLE_OPTS = "-Dorg.gradle.project.android.aapt2FromMavenOverride=${androidSdk}/libexec/android-sdk/build-tools/34.0.0/aapt2";
|
||||
ANDROID_SDK_ROOT = "${androidPkgs.androidsdk}/libexec/android-sdk";
|
||||
GRADLE_OPTS = let
|
||||
buildToolsVersion = (lib.head androidPkgs.build-tools).version;
|
||||
buildToolsDir = "${androidPkgs.androidsdk}/libexec/android-sdk/build-tools/${buildToolsVersion}";
|
||||
in lib.concatStringsSep " " [
|
||||
"-Dorg.gradle.project.android.aapt2FromMavenOverride=${buildToolsDir}/aapt2"
|
||||
];
|
||||
FLUTTER_SDK = "${flutter'}";
|
||||
JAVA_HOME = "${jdk'}/lib/openjdk";
|
||||
LIBSQLITE_PATH = "${pkgs.sqlite.out}/lib/libsqlite3.so";
|
||||
|
||||
@@ -12,6 +12,7 @@ import '../../settings.dart';
|
||||
|
||||
class DrawingBoard extends StatefulWidget {
|
||||
final Function(String)? onSuggestionChosen;
|
||||
final String? precedingText;
|
||||
final bool onlyOneCharacterSuggestions;
|
||||
final bool allowKanji;
|
||||
final bool allowHiragana;
|
||||
@@ -20,6 +21,7 @@ class DrawingBoard extends StatefulWidget {
|
||||
|
||||
const DrawingBoard({
|
||||
this.onSuggestionChosen,
|
||||
this.precedingText,
|
||||
this.onlyOneCharacterSuggestions = false,
|
||||
this.allowKanji = true,
|
||||
this.allowHiragana = false,
|
||||
@@ -72,6 +74,7 @@ class _DrawingBoardState extends State<DrawingBoard> {
|
||||
|
||||
final digitalInkRecognizer = DigitalInkRecognizer(languageCode: 'ja');
|
||||
final context = DigitalInkRecognitionContext(
|
||||
preContext: widget.precedingText,
|
||||
writingArea: WritingArea(
|
||||
height: signatureW.currentContext!.size!.height,
|
||||
width: signatureW.currentContext!.size!.width,
|
||||
|
||||
@@ -65,7 +65,14 @@ class GlobalSearchBar extends StatelessWidget {
|
||||
IconButton(
|
||||
icon: const Icon(Icons.mode),
|
||||
onPressed: () async {
|
||||
final result = await _drawKanji()(context);
|
||||
final precedingText = textController.selection.isValid
|
||||
? textController.text.substring(
|
||||
textController.selection.baseOffset,
|
||||
)
|
||||
: null;
|
||||
|
||||
final result = await _drawKanji(precedingText)(context);
|
||||
|
||||
if (result != null && result.isNotEmpty) {
|
||||
if (textController.selection.isValid) {
|
||||
final pos = textController.selection.baseOffset;
|
||||
@@ -93,7 +100,7 @@ class GlobalSearchBar extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
Future<String?> Function(BuildContext) _drawKanji() {
|
||||
Future<String?> Function(BuildContext) _drawKanji(String? precedingText) {
|
||||
final MaterialPageRoute<String> route = MaterialPageRoute(
|
||||
builder: (context) => Scaffold(
|
||||
appBar: AppBar(title: const Text('Draw a kanji')),
|
||||
@@ -102,6 +109,7 @@ class GlobalSearchBar extends StatelessWidget {
|
||||
children: [
|
||||
const Expanded(child: Column()),
|
||||
DrawingBoard(
|
||||
precedingText: precedingText,
|
||||
onlyOneCharacterSuggestions: true,
|
||||
onSuggestionChosen: (suggestion) =>
|
||||
Navigator.pop(context, suggestion),
|
||||
|
||||
@@ -73,17 +73,17 @@ class DatabaseMigration {
|
||||
Future<List<DatabaseMigration>> readMigrationsFromAssets() async {
|
||||
log('Reading migrations from assets...');
|
||||
|
||||
final String assetManifest = await rootBundle.loadString(
|
||||
'AssetManifest.json',
|
||||
);
|
||||
final assetManifest = await AssetManifest.loadFromAssetBundle(rootBundle);
|
||||
|
||||
final List<String> migrations =
|
||||
(jsonDecode(assetManifest) as Map<String, Object?>).keys
|
||||
.where(
|
||||
(assetPath) =>
|
||||
RegExp(r'^migrations\/\d{4}.*\.sql$').hasMatch(assetPath),
|
||||
)
|
||||
.toList();
|
||||
final List<String> migrations = assetManifest
|
||||
.listAssets()
|
||||
.where(
|
||||
(assetPath) =>
|
||||
RegExp(r'^migrations\/\d{4}.*\.sql$').hasMatch(assetPath),
|
||||
)
|
||||
.toList();
|
||||
|
||||
assert(migrations.isNotEmpty, 'No migration files found in assets');
|
||||
|
||||
migrations.sort();
|
||||
|
||||
@@ -191,10 +191,7 @@ Future<void> setupDatabase() async {
|
||||
|
||||
final String dbPath = await databasePath();
|
||||
|
||||
assert(
|
||||
File(dbPath).existsSync(),
|
||||
'Database file should exist at this point',
|
||||
);
|
||||
assert(File(dbPath).existsSync(), 'Database file should exist at this point');
|
||||
|
||||
final database = await openDatabaseWithoutMigrations(
|
||||
dbPath,
|
||||
|
||||
@@ -62,12 +62,6 @@ class DarkTheme extends AppTheme {
|
||||
return ThemeData(
|
||||
brightness: Brightness.dark,
|
||||
primarySwatch: createMaterialColor(AppTheme.mugitenWheat.background),
|
||||
pageTransitionsTheme: const PageTransitionsTheme(
|
||||
builders: {
|
||||
// Use PredictiveBackPageTransitionsBuilder to get the predictive back route transition!
|
||||
TargetPlatform.android: PredictiveBackPageTransitionsBuilder(),
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,12 +62,6 @@ class LightTheme extends AppTheme {
|
||||
brightness: Brightness.light,
|
||||
primarySwatch: createMaterialColor(AppTheme.mugitenWheat.background),
|
||||
// primarySwatch: Colors.green,
|
||||
pageTransitionsTheme: const PageTransitionsTheme(
|
||||
builders: {
|
||||
// Use PredictiveBackPageTransitionsBuilder to get the predictive back route transition!
|
||||
TargetPlatform.android: PredictiveBackPageTransitionsBuilder(),
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,9 +50,9 @@ class ColorSet {
|
||||
MaterialColor createMaterialColor(Color color) {
|
||||
final List<double> strengths = [.05];
|
||||
final swatch = <int, Color>{};
|
||||
final int r = color.red;
|
||||
final int g = color.green;
|
||||
final int b = color.blue;
|
||||
final int r = (color.r * 255.0).round().clamp(0, 255);
|
||||
final int g = (color.g * 255.0).round().clamp(0, 255);
|
||||
final int b = (color.b * 255.0).round().clamp(0, 255);
|
||||
|
||||
for (int i = 1; i < 10; i++) {
|
||||
strengths.add(0.1 * i);
|
||||
@@ -67,5 +67,5 @@ MaterialColor createMaterialColor(Color color) {
|
||||
1,
|
||||
);
|
||||
}
|
||||
return MaterialColor(color.value, swatch);
|
||||
return MaterialColor(color.toARGB32(), swatch);
|
||||
}
|
||||
|
||||
@@ -76,17 +76,24 @@ class _HistoryViewState extends State<HistoryView> {
|
||||
fetchNextPage: fetchNextPage,
|
||||
separatorBuilder: (context, index) {
|
||||
if (index == 0) {
|
||||
final firstItemDate =
|
||||
_pagingController.items![1]!.lastTimestamp;
|
||||
return _dateDivider(firstItemDate);
|
||||
if (_pagingController.items == null ||
|
||||
_pagingController.items!.length < 2) {
|
||||
// No history entries, or the items has not been loaded yet.
|
||||
return SizedBox.shrink();
|
||||
} else {
|
||||
final firstItemDate =
|
||||
_pagingController.items![1]!.lastTimestamp;
|
||||
return _dateDivider(firstItemDate);
|
||||
}
|
||||
}
|
||||
|
||||
final data = _pagingController.items!;
|
||||
|
||||
final HistoryEntry search = data[index]!;
|
||||
|
||||
// Previous in the sense of time, but it is the next item in the list.
|
||||
final HistoryEntry? previousSearch =
|
||||
data.length >= index + 1 ? data[index + 1] : null;
|
||||
data.length > index + 1 ? data[index + 1] : null;
|
||||
|
||||
if (previousSearch != null &&
|
||||
!dateIsEqual(
|
||||
|
||||
@@ -8,6 +8,7 @@ import 'package:mdi/mdi.dart';
|
||||
import 'package:mugiten/bloc/theme/theme_bloc.dart';
|
||||
import 'package:mugiten/components/search/search_results_body/parts/circle_badge.dart';
|
||||
import 'package:mugiten/models/history_entry.dart';
|
||||
import 'package:mugiten/services/datetime.dart';
|
||||
import 'package:mugiten/services/snackbar.dart';
|
||||
import 'package:mugiten/settings.dart';
|
||||
import 'package:sqflite/sqflite.dart';
|
||||
@@ -84,7 +85,7 @@ class _WordSearchResultPageState extends State<WordSearchResultPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text('Search'),
|
||||
title: Text('"${widget.searchTerm}"'),
|
||||
actions: [
|
||||
if (incognitoModeEnabled)
|
||||
IconButton(
|
||||
@@ -96,9 +97,32 @@ class _WordSearchResultPageState extends State<WordSearchResultPage> {
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 20),
|
||||
child: BlocBuilder<ThemeBloc, ThemeState>(
|
||||
builder: (context, themeState) => CircleBadge(
|
||||
color: themeState.theme.menuGreyNormal.background,
|
||||
child: Text('${historyEntry!.timestampCount}'),
|
||||
builder: (context, themeState) => GestureDetector(
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => Scaffold(
|
||||
appBar: AppBar(title: const Text('Last searched')),
|
||||
body: ListView(
|
||||
children: historyEntry!.timestamps
|
||||
.map(
|
||||
(ts) => ListTile(
|
||||
title: Text(
|
||||
'${formatDate(ts)} ${formatTime(ts)}',
|
||||
),
|
||||
),
|
||||
)
|
||||
.toList(),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
child: CircleBadge(
|
||||
color: themeState.theme.menuGreyNormal.background,
|
||||
child: Text('${historyEntry!.timestampCount}'),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -1,44 +1,73 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get_it/get_it.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
final SharedPreferences _prefs = GetIt.instance.get<SharedPreferences>();
|
||||
|
||||
enum JapaneseFont { none, droidSansJapanese, notoSansCJK, notoSerifCJK }
|
||||
enum JapaneseFont {
|
||||
system,
|
||||
droidSansJapanese,
|
||||
hinaMincho,
|
||||
ibmPlexSansJP,
|
||||
kleeOne,
|
||||
kosugi,
|
||||
mPlus2,
|
||||
mPlusRounded1c,
|
||||
notoSansJapanese,
|
||||
notoSerifJapanese,
|
||||
zenKurenaido,
|
||||
}
|
||||
|
||||
extension Methods on JapaneseFont {
|
||||
TextStyle get textStyle {
|
||||
String? fontFamily;
|
||||
switch (this) {
|
||||
case JapaneseFont.droidSansJapanese:
|
||||
fontFamily = 'Droid Sans Japanese';
|
||||
break;
|
||||
case JapaneseFont.notoSansCJK:
|
||||
fontFamily = 'Noto Sans CJK';
|
||||
break;
|
||||
case JapaneseFont.notoSerifCJK:
|
||||
fontFamily = 'Noto Serif CJK';
|
||||
break;
|
||||
case JapaneseFont.none:
|
||||
TextStyle(fontFamily: 'Droid Sans Japanese');
|
||||
case JapaneseFont.notoSansJapanese:
|
||||
return GoogleFonts.notoSansJp();
|
||||
case JapaneseFont.notoSerifJapanese:
|
||||
return GoogleFonts.notoSerifJp();
|
||||
case JapaneseFont.hinaMincho:
|
||||
return GoogleFonts.hinaMincho();
|
||||
case JapaneseFont.ibmPlexSansJP:
|
||||
return GoogleFonts.ibmPlexSansJp();
|
||||
case JapaneseFont.kleeOne:
|
||||
return GoogleFonts.kleeOne();
|
||||
case JapaneseFont.kosugi:
|
||||
return GoogleFonts.kosugi();
|
||||
case JapaneseFont.mPlus2:
|
||||
return GoogleFonts.mPlus2();
|
||||
case JapaneseFont.mPlusRounded1c:
|
||||
return GoogleFonts.mPlusRounded1c();
|
||||
case JapaneseFont.zenKurenaido:
|
||||
return GoogleFonts.zenTokyoZoo();
|
||||
case JapaneseFont.system:
|
||||
}
|
||||
return TextStyle(fontFamily: fontFamily);
|
||||
|
||||
return const TextStyle();
|
||||
}
|
||||
|
||||
String get name =>
|
||||
{
|
||||
JapaneseFont.none: 'Default',
|
||||
JapaneseFont.droidSansJapanese: 'Droid Sans Japanese',
|
||||
JapaneseFont.notoSansCJK: 'Noto Sans CJK',
|
||||
JapaneseFont.notoSerifCJK: 'Noto Serif CJK',
|
||||
}[this] ??
|
||||
'';
|
||||
String get name => switch (this) {
|
||||
JapaneseFont.system => 'System Default',
|
||||
JapaneseFont.droidSansJapanese => 'Droid Sans Japanese',
|
||||
JapaneseFont.notoSansJapanese => 'Noto Sans Japanese',
|
||||
JapaneseFont.notoSerifJapanese => 'Noto Serif Japanese',
|
||||
JapaneseFont.hinaMincho => 'Hina Mincho',
|
||||
JapaneseFont.ibmPlexSansJP => 'IBM Plex Sans JP',
|
||||
JapaneseFont.kleeOne => 'Klee One',
|
||||
JapaneseFont.kosugi => 'Kosugi',
|
||||
JapaneseFont.mPlus2 => 'M PLUS 2',
|
||||
JapaneseFont.mPlusRounded1c => 'M PLUS Rounded 1c',
|
||||
JapaneseFont.zenKurenaido => 'Zen Kurenaido',
|
||||
};
|
||||
}
|
||||
|
||||
const Map<String, dynamic> _defaults = {
|
||||
'incognitoModeEnabled': false,
|
||||
'romajiEnabled': false,
|
||||
'darkThemeEnabled': false,
|
||||
'autoThemeEnabled': false,
|
||||
'autoThemeEnabled': true,
|
||||
'japaneseFont': JapaneseFont.droidSansJapanese,
|
||||
'reduceKanjiDrawingBoardSize': false,
|
||||
};
|
||||
|
||||
332
pubspec.lock
332
pubspec.lock
@@ -21,10 +21,10 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: archive
|
||||
sha256: "2fde1607386ab523f7a36bb3e7edb43bd58e6edaf2ffb29d8a6d578b297fdbbd"
|
||||
sha256: a96e8b390886ee8abb49b7bd3ac8df6f451c621619f52a26e815fdcf568959ff
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.0.7"
|
||||
version: "4.0.9"
|
||||
args:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -45,10 +45,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: bloc
|
||||
sha256: "52c10575f4445c61dd9e0cafcc6356fdd827c4c64dd7945ef3c4105f6b6ac189"
|
||||
sha256: a48653a82055a900b88cd35f92429f068c5a8057ae9b136d197b3d56c57efb81
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "9.0.0"
|
||||
version: "9.2.0"
|
||||
boolean_selector:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -61,10 +61,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: characters
|
||||
sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803
|
||||
sha256: faf38497bda5ead2a8c7615f4f7939df04333478bf32e4173fcb06d428b5716b
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.4.0"
|
||||
version: "1.4.1"
|
||||
checked_yaml:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -89,6 +89,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.2"
|
||||
code_assets:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: code_assets
|
||||
sha256: "83ccdaa064c980b5596c35dd64a8d3ecc68620174ab9b90b6343b753aa721687"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.0"
|
||||
collection:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@@ -101,18 +109,18 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: cross_file
|
||||
sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670"
|
||||
sha256: "28bb3ae56f117b5aec029d702a90f57d285cd975c3c5c281eaca38dbc47c5937"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.3.4+2"
|
||||
version: "0.3.5+2"
|
||||
crypto:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: crypto
|
||||
sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855"
|
||||
sha256: c8ea0233063ba03258fbcf2ca4d6dadfefe14f02fab57702265467a19f27fadf
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.6"
|
||||
version: "3.0.7"
|
||||
csslib:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -125,10 +133,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: csv
|
||||
sha256: c6aa2679b2a18cb57652920f674488d89712efaf4d3fdf2e537215b35fc19d6c
|
||||
sha256: bef2950f7a753eb82f894a2eabc3072e73cf21c17096296a5a992797e50b1d0d
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.0.0"
|
||||
version: "7.1.0"
|
||||
cupertino_icons:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@@ -137,6 +145,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.8"
|
||||
dbus:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: dbus
|
||||
sha256: d0c98dcd4f5169878b6cf8f6e0a52403a9dff371a3e2f019697accbf6f44a270
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.7.12"
|
||||
division:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@@ -149,10 +165,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: equatable
|
||||
sha256: "567c64b3cb4cf82397aac55f4f0cbd3ca20d77c6c03bedbc4ceaddc08904aef7"
|
||||
sha256: "3e0141505477fd8ad55d6eb4e7776d3fe8430be8e497ccb1521370c3f21a3e2b"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.0.7"
|
||||
version: "2.0.8"
|
||||
fake_async:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -165,10 +181,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: ffi
|
||||
sha256: "289279317b4b16eb2bb7e271abccd4bf84ec9bdcbe999e278a94b804f5630418"
|
||||
sha256: "6d7fd89431262d8f3125e81b50d3847a091d846eafcd4fdb88dd06f36d705a45"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.4"
|
||||
version: "2.2.0"
|
||||
file:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -181,10 +197,10 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: file_picker
|
||||
sha256: ef9908739bdd9c476353d6adff72e88fd00c625f5b959ae23f7567bd5137db0a
|
||||
sha256: "57d9a1dd5063f85fa3107fb42d1faffda52fdc948cefd5fe5ea85267a5fc7343"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "10.2.0"
|
||||
version: "10.3.10"
|
||||
fixnum:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -234,26 +250,26 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flutter_markdown_plus
|
||||
sha256: fe74214c5ac2f850d93efda290dcde3f18006e90a87caa9e3e6c13222a5db4de
|
||||
sha256: "039177906850278e8fb1cd364115ee0a46281135932fa8ecea8455522166d2de"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.3"
|
||||
version: "1.0.7"
|
||||
flutter_native_splash:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: flutter_native_splash
|
||||
sha256: "8321a6d11a8d13977fa780c89de8d257cce3d841eecfb7a4cadffcc4f12d82dc"
|
||||
sha256: "4fb9f4113350d3a80841ce05ebf1976a36de622af7d19aca0ca9a9911c7ff002"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.4.6"
|
||||
version: "2.4.7"
|
||||
flutter_plugin_android_lifecycle:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_plugin_android_lifecycle
|
||||
sha256: f948e346c12f8d5480d2825e03de228d0eb8c3a737e4cdaa122267b89c022b5e
|
||||
sha256: ee8068e0e1cd16c4a82714119918efdeed33b3ba7772c54b5d094ab53f9b7fd1
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.0.28"
|
||||
version: "2.0.33"
|
||||
flutter_settings_ui:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@@ -266,10 +282,10 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flutter_slidable
|
||||
sha256: ab7dbb16f783307c9d7762ede2593ce32c220ba2ba0fd540a3db8e9a3acba71a
|
||||
sha256: ea369262929d3cc6ebf9d8a00c196127966f117fe433a5e5cb47fb08008ca203
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.0.0"
|
||||
version: "4.0.3"
|
||||
flutter_staggered_grid_view:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -282,10 +298,10 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flutter_svg
|
||||
sha256: cd57f7969b4679317c17af6fd16ee233c1e60a82ed209d8a475c54fd6fd6f845
|
||||
sha256: "87fbd7c534435b6c5d9d98b01e1fd527812b82e68ddd8bd35fc45ed0fa8f0a95"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.2.0"
|
||||
version: "2.2.3"
|
||||
flutter_test:
|
||||
dependency: "direct dev"
|
||||
description: flutter
|
||||
@@ -300,26 +316,50 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: get_it
|
||||
sha256: f126a3e286b7f5b578bf436d5592968706c4c1de28a228b870ce375d9f743103
|
||||
sha256: "568d62f0e68666fb5d95519743b3c24a34c7f19d834b0658c46e26d778461f66"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "8.0.3"
|
||||
version: "9.2.1"
|
||||
glob:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: glob
|
||||
sha256: c3f1ee72c96f8f78935e18aa8cecced9ab132419e8625dc187e1c2408efc20de
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.3"
|
||||
google_fonts:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: google_fonts
|
||||
sha256: db9df7a5898d894eeda4c78143f35c30a243558be439518972366880b80bf88e
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "8.0.2"
|
||||
google_mlkit_commons:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: google_mlkit_commons
|
||||
sha256: "8f40fbac10685cad4715d11e6a0d86837d9ad7168684dfcad29610282a88e67a"
|
||||
sha256: "3e69fea4211727732cc385104e675ad1e40b29f12edd492ee52fa108423a6124"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.11.0"
|
||||
version: "0.11.1"
|
||||
google_mlkit_digital_ink_recognition:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: google_mlkit_digital_ink_recognition
|
||||
sha256: "8d2b89401bdeeba97158377167429dbc5cb339ebbd21e0889dca773f1c79a884"
|
||||
sha256: e841430c7c18e2d82d109914342bccf56084db080b1a997b66b6dac01200ee13
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.14.1"
|
||||
version: "0.14.2"
|
||||
hooks:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: hooks
|
||||
sha256: "7a08a0d684cb3b8fb604b78455d5d352f502b68079f7b80b831c62220ab0a4f6"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.1"
|
||||
html:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -332,10 +372,10 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: http
|
||||
sha256: "2c11f3f94c687ee9bad77c171151672986360b2b001d109814ee7140b2cf261b"
|
||||
sha256: "87721a4a50b19c7f1d49001e51409bddc46303966ce89a65af4f4e6004896412"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.4.0"
|
||||
version: "1.6.0"
|
||||
http_parser:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -348,24 +388,24 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: image
|
||||
sha256: "4e973fcf4caae1a4be2fa0a13157aa38a8f9cb049db6529aa00b4d71abc4d928"
|
||||
sha256: f9881ff4998044947ec38d098bc7c8316ae1186fa786eddffdb867b9bc94dfce
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.5.4"
|
||||
version: "4.8.0"
|
||||
infinite_scroll_pagination:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: infinite_scroll_pagination
|
||||
sha256: "9b8f95362928a1de835658835194b435c40f2bfc386f6545c1fd706203df0cd4"
|
||||
sha256: b0d28e37cd8f62490ff6aef63f9db93d4c78b7f11b7c6b26f33c69d8476fda78
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "5.1.0"
|
||||
version: "5.1.1"
|
||||
jadb:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
path: "."
|
||||
ref: HEAD
|
||||
resolved-ref: "2803db9c124c05d75f6e352026e26bac8a1ecfb2"
|
||||
resolved-ref: "1783338b2ac69d504743eba006f5e8203bad6580"
|
||||
url: "https://git.pvv.ntnu.no/oysteikt/jadb.git"
|
||||
source: git
|
||||
version: "1.0.0"
|
||||
@@ -373,50 +413,58 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: json_annotation
|
||||
sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1"
|
||||
sha256: cb09e7dac6210041fad964ed7fbee004f14258b4eca4040f72d1234062ace4c8
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.9.0"
|
||||
version: "4.11.0"
|
||||
l10n_languages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: l10n_languages
|
||||
sha256: "2360da28a5e2d9eaec5ac93151f27b2173338871b5486f757d088fc92a3a2b62"
|
||||
sha256: "16b0026dc7261a712d3176595e7622138dace92e9cf1efc00989ef45b47725dd"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.0"
|
||||
version: "2.0.2"
|
||||
leak_tracker:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: leak_tracker
|
||||
sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0"
|
||||
sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "10.0.9"
|
||||
version: "11.0.2"
|
||||
leak_tracker_flutter_testing:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: leak_tracker_flutter_testing
|
||||
sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573
|
||||
sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.9"
|
||||
version: "3.0.10"
|
||||
leak_tracker_testing:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: leak_tracker_testing
|
||||
sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
|
||||
sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.1"
|
||||
version: "3.0.2"
|
||||
lints:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: lints
|
||||
sha256: a5e2b223cb7c9c8efdc663ef484fdd95bb243bff242ef5b13e26883547fce9a0
|
||||
sha256: "12f842a479589fea194fe5c5a3095abc7be0c1f2ddfa9a0e76aed1dbd26a87df"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.0.0"
|
||||
version: "6.1.0"
|
||||
logging:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: logging
|
||||
sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.3.0"
|
||||
markdown:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@@ -429,18 +477,18 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: matcher
|
||||
sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2
|
||||
sha256: "12956d0ad8390bbcc63ca2e1469c0619946ccb52809807067a7020d57e647aa6"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.12.17"
|
||||
version: "0.12.18"
|
||||
material_color_utilities:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: material_color_utilities
|
||||
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
|
||||
sha256: "9c337007e82b1889149c82ed242ed1cb24a66044e30979c44912381e9be4c48b"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.11.1"
|
||||
version: "0.13.0"
|
||||
mdi:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@@ -453,10 +501,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: meta
|
||||
sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c
|
||||
sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.16.0"
|
||||
version: "1.17.0"
|
||||
mime:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -465,6 +513,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
native_toolchain_c:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: native_toolchain_c
|
||||
sha256: "89e83885ba09da5fdf2cdacc8002a712ca238c28b7f717910b34bcd27b0d03ac"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.17.4"
|
||||
nested:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -473,22 +529,30 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.0"
|
||||
objective_c:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: objective_c
|
||||
sha256: "100a1c87616ab6ed41ec263b083c0ef3261ee6cd1dc3b0f35f8ddfa4f996fe52"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "9.3.0"
|
||||
package_info_plus:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: package_info_plus
|
||||
sha256: "7976bfe4c583170d6cdc7077e3237560b364149fcd268b5f53d95a991963b191"
|
||||
sha256: f69da0d3189a4b4ceaeb1a3defb0f329b3b352517f52bed4290f83d4f06bc08d
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "8.3.0"
|
||||
version: "9.0.0"
|
||||
package_info_plus_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: package_info_plus_platform_interface
|
||||
sha256: "6c935fb612dff8e3cc9632c2b301720c77450a126114126ffaafe28d2e87956c"
|
||||
sha256: "202a487f08836a592a6bd4f901ac69b3a8f146af552bbd14407b6b41e1c3f086"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.2.0"
|
||||
version: "3.2.1"
|
||||
path:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@@ -517,18 +581,18 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path_provider_android
|
||||
sha256: d0d310befe2c8ab9e7f393288ccbb11b60c019c6b5afc21973eeee4dda2b35e9
|
||||
sha256: f2c65e21139ce2c3dad46922be8272bb5963516045659e71bb16e151c93b580e
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.2.17"
|
||||
version: "2.2.22"
|
||||
path_provider_foundation:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path_provider_foundation
|
||||
sha256: "4843174df4d288f5e29185bd6e72a6fbdf5a4a4602717eed565497429f179942"
|
||||
sha256: "2a376b7d6392d80cd3705782d2caa734ca4727776db0b6ec36ef3f1855197699"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.4.1"
|
||||
version: "2.6.0"
|
||||
path_provider_linux:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -557,10 +621,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: petitparser
|
||||
sha256: "07c8f0b1913bcde1ff0d26e57ace2f3012ccbf2b204e070290dad3bb22797646"
|
||||
sha256: "91bd59303e9f769f108f8df05e371341b15d59e995e6806aefab827b58336675"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.1.0"
|
||||
version: "7.0.2"
|
||||
platform:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -589,10 +653,18 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: provider
|
||||
sha256: "4abbd070a04e9ddc287673bf5a030c7ca8b685ff70218720abab8b092f53dd84"
|
||||
sha256: "4e82183fa20e5ca25703ead7e05de9e4cceed1fbd1eadc1ac3cb6f565a09f272"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.1.5"
|
||||
version: "6.1.5+1"
|
||||
pub_semver:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: pub_semver
|
||||
sha256: "5bfcf68ca79ef689f8990d1160781b4bad40a3bd5e5218ad4076ddb7f4081585"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.2.0"
|
||||
ruby_text:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@@ -605,50 +677,50 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: sealed_languages
|
||||
sha256: cd8b4b6ee911b00a95a5f760fa51527497e23a35b120f8ed50442b17a4524ec8
|
||||
sha256: bf7a479389196ae29a074a8451734a71d11282f5380bd72e07d339047b011a29
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.2.0"
|
||||
version: "3.0.1"
|
||||
share_plus:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: share_plus
|
||||
sha256: b2961506569e28948d75ec346c28775bb111986bb69dc6a20754a457e3d97fa0
|
||||
sha256: "14c8860d4de93d3a7e53af51bff479598c4e999605290756bbbe45cf65b37840"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "11.0.0"
|
||||
version: "12.0.1"
|
||||
share_plus_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: share_plus_platform_interface
|
||||
sha256: "1032d392bc5d2095a77447a805aa3f804d2ae6a4d5eef5e6ebb3bd94c1bc19ef"
|
||||
sha256: "88023e53a13429bd65d8e85e11a9b484f49d4c190abbd96c7932b74d6927cc9a"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.0.0"
|
||||
version: "6.1.0"
|
||||
shared_preferences:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: shared_preferences
|
||||
sha256: "6e8bf70b7fef813df4e9a36f658ac46d107db4b4cfe1048b477d4e453a8159f5"
|
||||
sha256: "2939ae520c9024cb197fc20dee269cd8cdbf564c8b5746374ec6cacdc5169e64"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.5.3"
|
||||
version: "2.5.4"
|
||||
shared_preferences_android:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_android
|
||||
sha256: "20cbd561f743a342c76c151d6ddb93a9ce6005751e7aa458baad3858bfbfb6ac"
|
||||
sha256: cbc40be9be1c5af4dab4d6e0de4d5d3729e6f3d65b89d21e1815d57705644a6f
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.4.10"
|
||||
version: "2.4.20"
|
||||
shared_preferences_foundation:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_foundation
|
||||
sha256: "6a52cfcdaeac77cad8c97b539ff688ccfc458c007b4db12be584fbe5c0e49e03"
|
||||
sha256: "4e7eaffc2b17ba398759f1151415869a34771ba11ebbccd1b0145472a619a64f"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.5.4"
|
||||
version: "2.5.6"
|
||||
shared_preferences_linux:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -706,18 +778,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: source_span
|
||||
sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c"
|
||||
sha256: "56a02f1f4cd1a2d96303c0144c93bd6d909eea6bee6bf5a0e0b685edbd4c47ab"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.10.1"
|
||||
sprintf:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: sprintf
|
||||
sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "7.0.0"
|
||||
version: "1.10.2"
|
||||
sqflite:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@@ -730,26 +794,26 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: sqflite_android
|
||||
sha256: "2b3070c5fa881839f8b402ee4a39c1b4d561704d4ebbbcfb808a119bc2a1701b"
|
||||
sha256: ecd684501ebc2ae9a83536e8b15731642b9570dc8623e0073d227d0ee2bfea88
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.4.1"
|
||||
version: "2.4.2+2"
|
||||
sqflite_common:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: sqflite_common
|
||||
sha256: "84731e8bfd8303a3389903e01fb2141b6e59b5973cacbb0929021df08dddbe8b"
|
||||
sha256: "6ef422a4525ecc601db6c0a2233ff448c731307906e92cabc9ba292afaae16a6"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.5.5"
|
||||
version: "2.5.6"
|
||||
sqflite_common_ffi:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: sqflite_common_ffi
|
||||
sha256: "9faa2fedc5385ef238ce772589f7718c24cdddd27419b609bb9c6f703ea27988"
|
||||
sha256: c59fcdc143839a77581f7a7c4de018e53682408903a0a0800b95ef2dc4033eff
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.3.6"
|
||||
version: "2.4.0+2"
|
||||
sqflite_darwin:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -767,21 +831,21 @@ packages:
|
||||
source: hosted
|
||||
version: "2.4.0"
|
||||
sqlite3:
|
||||
dependency: transitive
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: sqlite3
|
||||
sha256: "608b56d594e4c8498c972c8f1507209f9fd74939971b948ddbbfbfd1c9cb3c15"
|
||||
sha256: b7cf6b37667f6a921281797d2499ffc60fb878b161058d422064f0ddc78f6aa6
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.7.7"
|
||||
version: "3.1.6"
|
||||
sqlite3_flutter_libs:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: sqlite3_flutter_libs
|
||||
sha256: "8b4bd239bedd20ee628aed587b4c5b387328e85945c9ecbae19a93bdcd171524"
|
||||
sha256: "3ed7553eee7bb368f8950f58ba29f634e06e813c029aff6a0d60862b96de8454"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.5.36"
|
||||
version: "0.6.0+eol"
|
||||
stack_trace:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -826,10 +890,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: test_api
|
||||
sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd
|
||||
sha256: "93167629bfc610f71560ab9312acdda4959de4df6fac7492c89ff0d3886f6636"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.7.4"
|
||||
version: "0.7.9"
|
||||
tuple:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -850,10 +914,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: universal_io
|
||||
sha256: "1722b2dcc462b4b2f3ee7d188dad008b6eb4c40bbd03a3de451d82c78bba9aad"
|
||||
sha256: f63cbc48103236abf48e345e07a03ce5757ea86285ed313a6a032596ed9301e2
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.2.2"
|
||||
version: "2.3.1"
|
||||
url_launcher:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@@ -866,34 +930,34 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_android
|
||||
sha256: "8582d7f6fe14d2652b4c45c9b6c14c0b678c2af2d083a11b604caeba51930d79"
|
||||
sha256: "767344bf3063897b5cf0db830e94f904528e6dd50a6dfaf839f0abf509009611"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.3.16"
|
||||
version: "6.3.28"
|
||||
url_launcher_ios:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_ios
|
||||
sha256: "7f2022359d4c099eea7df3fdf739f7d3d3b9faf3166fb1dd390775176e0b76cb"
|
||||
sha256: "580fe5dfb51671ae38191d316e027f6b76272b026370708c2d898799750a02b0"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.3.3"
|
||||
version: "6.4.1"
|
||||
url_launcher_linux:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_linux
|
||||
sha256: "4e9ba368772369e3e08f231d2301b4ef72b9ff87c31192ef471b380ef29a4935"
|
||||
sha256: d5e14138b3bc193a0f63c10a53c94b91d399df0512b1f29b94a043db7482384a
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.2.1"
|
||||
version: "3.2.2"
|
||||
url_launcher_macos:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_macos
|
||||
sha256: "17ba2000b847f334f16626a574c702b196723af2a289e7a93ffcb79acff855c2"
|
||||
sha256: "368adf46f71ad3c21b8f06614adb38346f193f3a59ba8fe9a2fd74133070ba18"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.2.2"
|
||||
version: "3.2.5"
|
||||
url_launcher_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -906,26 +970,26 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_web
|
||||
sha256: "4bd2b7b4dc4d4d0b94e5babfffbca8eac1a126c7f3d6ecbc1a11013faa3abba2"
|
||||
sha256: d0412fcf4c6b31ecfdb7762359b7206ffba3bbffd396c6d9f9c4616ece476c1f
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.4.1"
|
||||
version: "2.4.2"
|
||||
url_launcher_windows:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_windows
|
||||
sha256: "3284b6d2ac454cf34f114e1d3319866fdd1e19cdc329999057e44ffe936cfa77"
|
||||
sha256: "712c70ab1b99744ff066053cbe3e80c73332b38d46e5e945c98689b2e66fc15f"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.1.4"
|
||||
version: "3.1.5"
|
||||
uuid:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: uuid
|
||||
sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff
|
||||
sha256: a11b666489b1954e01d992f3d601b1804a33937b5a8fe677bd26b8a9f96f96e8
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.5.1"
|
||||
version: "4.5.2"
|
||||
vector_graphics:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -946,26 +1010,26 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: vector_graphics_compiler
|
||||
sha256: "557a315b7d2a6dbb0aaaff84d857967ce6bdc96a63dc6ee2a57ce5a6ee5d3331"
|
||||
sha256: "5a88dd14c0954a5398af544651c7fb51b457a2a556949bfb25369b210ef73a74"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.17"
|
||||
version: "1.2.0"
|
||||
vector_math:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: vector_math
|
||||
sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
|
||||
sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.4"
|
||||
version: "2.2.0"
|
||||
vm_service:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: vm_service
|
||||
sha256: ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02
|
||||
sha256: "45caa6c5917fa127b5dbcfbd1fa60b14e583afdc08bfc96dda38886ca252eb60"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "15.0.0"
|
||||
version: "15.0.2"
|
||||
web:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -978,10 +1042,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: win32
|
||||
sha256: "66814138c3562338d05613a6e368ed8cfb237ad6d64a9e9334be3f309acfca03"
|
||||
sha256: d7cb55e04cd34096cd3a79b3330245f54cb96a370a1c27adb3c84b917de8b08e
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "5.14.0"
|
||||
version: "5.15.0"
|
||||
xdg_directories:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -994,10 +1058,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: xml
|
||||
sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226
|
||||
sha256: "971043b3a0d3da28727e40ed3e0b5d18b742fa5a68665cca88e74b7876d5e025"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.5.0"
|
||||
version: "6.6.1"
|
||||
yaml:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -1007,5 +1071,5 @@ packages:
|
||||
source: hosted
|
||||
version: "3.1.3"
|
||||
sdks:
|
||||
dart: ">=3.8.0 <4.0.0"
|
||||
flutter: ">=3.27.1"
|
||||
dart: ">=3.10.8 <4.0.0"
|
||||
flutter: ">=3.38.4"
|
||||
|
||||
24
pubspec.yaml
24
pubspec.yaml
@@ -1,10 +1,10 @@
|
||||
name: mugiten
|
||||
description: "A new Flutter project."
|
||||
publish_to: "none" # Remove this line if you wish to publish to pub.dev
|
||||
version: 0.4.0+1
|
||||
version: 0.5.0+1
|
||||
|
||||
environment:
|
||||
sdk: ^3.8.0
|
||||
sdk: ^3.9.0
|
||||
|
||||
dependencies:
|
||||
flutter:
|
||||
@@ -18,7 +18,7 @@ dependencies:
|
||||
flutter_settings_ui: ^3.0.1
|
||||
flutter_slidable: ^4.0.0
|
||||
flutter_svg: ^2.0.17
|
||||
get_it: ^8.0.3
|
||||
get_it: ^9.0.5
|
||||
http: ^1.3.0
|
||||
jadb:
|
||||
git:
|
||||
@@ -26,21 +26,23 @@ dependencies:
|
||||
mdi: ^5.0.0-nullsafety.0
|
||||
path: ^1.9.0
|
||||
path_provider: ^2.1.5
|
||||
share_plus: ^11.0.0
|
||||
share_plus: ^12.0.1
|
||||
shared_preferences: ^2.5.3
|
||||
signature: ^6.3.0
|
||||
url_launcher: ^6.3.1
|
||||
sqflite: ^2.4.1
|
||||
sqlite3_flutter_libs: ^0.5.32
|
||||
sqlite3_flutter_libs: ^0.6.0+eol
|
||||
sqflite_common_ffi: ^2.3.4+4
|
||||
ruby_text: ^3.0.3
|
||||
sqlite3: ^3.0.0
|
||||
google_mlkit_digital_ink_recognition: ^0.14.1
|
||||
archive: ^4.0.7
|
||||
package_info_plus: ^8.3.0
|
||||
package_info_plus: ^9.0.0
|
||||
flutter_markdown_plus: ^1.0.3
|
||||
markdown: ^7.3.0
|
||||
sealed_languages: ^2.1.0
|
||||
sealed_languages: ^3.0.0
|
||||
infinite_scroll_pagination: ^5.1.0
|
||||
google_fonts: ^8.0.2
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
@@ -67,11 +69,3 @@ flutter:
|
||||
- family: Droid Sans Japanese
|
||||
fonts:
|
||||
- asset: assets/fonts/DroidSansJapanese.ttf
|
||||
|
||||
- family: Noto Sans CJK
|
||||
fonts:
|
||||
- asset: assets/fonts/NotoSansCJK-Regular.ttc
|
||||
|
||||
- family: Noto Serif CJK
|
||||
fonts:
|
||||
- asset: assets/fonts/NotoSerifCJK-Regular.ttc
|
||||
|
||||
60
scripts/publish.sh
Executable file
60
scripts/publish.sh
Executable file
@@ -0,0 +1,60 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
declare -a COMMANDS=(
|
||||
curl
|
||||
git
|
||||
)
|
||||
|
||||
for cmd in "${COMMANDS[@]}"; do
|
||||
if ! command -v "$cmd" &> /dev/null; then
|
||||
echo "$cmd could not be found" >&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -z "${GITEA_USER:-}" ]; then
|
||||
echo "GITEA_USER is not set" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "${GITEA_TOKEN:-}" ]; then
|
||||
echo "GITEA_TOKEN is not set" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$#" -ne 1 ]; then
|
||||
echo "Usage: $0 <version>" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
declare -r VERSION="$1"
|
||||
|
||||
if [[ ! "$VERSION" =~ ^v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+$ ]]; then
|
||||
echo "$VERSION does not look like a valid version name"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
declare -r PACKAGE_API_ENDPOINT="https://git.pvv.ntnu.no/api/packages/mugiten/generic/mugiten/$VERSION/mugiten.apk"
|
||||
|
||||
declare -r PROJECT_ROOT="$(git rev-parse --show-toplevel)"
|
||||
|
||||
if [[ ! -f "$PROJECT_ROOT/build/app/outputs/apk/release/app-release.apk" ]]; then
|
||||
echo "$PROJECT_ROOT/build/app/outputs/apk/release/app-release.apk does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if curl -X GET --silent --head --fail --user "$GITEA_USER:$GITEA_TOKEN" "$PACKAGE_API_ENDPOINT" >/dev/null; then
|
||||
echo "Version $VERSION seems to already exist"
|
||||
exit 1
|
||||
else
|
||||
echo "Uploading APK for version $VERSION..."
|
||||
|
||||
curl \
|
||||
-X PUT \
|
||||
--user "$GITEA_USER:$GITEA_TOKEN" \
|
||||
--progress-bar \
|
||||
--upload-file "$PROJECT_ROOT/build/app/outputs/apk/release/app-release.apk" \
|
||||
"$PACKAGE_API_ENDPOINT"
|
||||
fi
|
||||
@@ -7,7 +7,6 @@ import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:get_it/get_it.dart';
|
||||
import 'package:mugiten/database/database.dart';
|
||||
import 'package:mugiten/models/library_list.dart';
|
||||
import 'package:sqflite/sqflite.dart';
|
||||
import 'package:sqflite_common_ffi/sqflite_ffi.dart';
|
||||
import 'package:sqlite3/open.dart';
|
||||
|
||||
@@ -21,11 +20,11 @@ Future<Database> createDatabaseCopy({
|
||||
}
|
||||
|
||||
// Make a copy of jadbPath
|
||||
final random_suffix = Random()
|
||||
final randomSuffix = Random()
|
||||
.nextInt((pow(2, 32) - 1) as int)
|
||||
.toRadixString(16);
|
||||
final jadbCopyPath = jadbFile.parent.uri
|
||||
.resolve('jadb_copy_$random_suffix.sqlite')
|
||||
.resolve('jadb_copy_$randomSuffix.sqlite')
|
||||
.path;
|
||||
|
||||
await jadbFile.copy(jadbCopyPath);
|
||||
@@ -34,7 +33,7 @@ Future<Database> createDatabaseCopy({
|
||||
|
||||
// Initialize FFI
|
||||
sqfliteFfiInit();
|
||||
databaseFactory = await createDatabaseFactoryFfi(
|
||||
databaseFactory = createDatabaseFactoryFfi(
|
||||
ffiInit: () =>
|
||||
open.overrideForAll(() => DynamicLibrary.open(libsqlitePath)),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user