From 9fa1a11fbeda33a79fe1a5ea9adb6731bf511c7c Mon Sep 17 00:00:00 2001 From: Leptopoda-GitHub Date: Wed, 24 Nov 2021 14:32:21 +0100 Subject: [PATCH] remove enviorment configs --- flutter-init.sh | 7 --- src/ui/flutter_app/lib/screens/env_page.dart | 56 -------------------- src/ui/flutter_app/pubspec.yaml | 1 - 3 files changed, 64 deletions(-) delete mode 100644 src/ui/flutter_app/lib/screens/env_page.dart diff --git a/flutter-init.sh b/flutter-init.sh index fcc53e53..7b1d517e 100755 --- a/flutter-init.sh +++ b/flutter-init.sh @@ -1,8 +1,5 @@ #!/bin/bash -ENV_FILE_PATH=assets/files -ENV_FILE=$ENV_FILE_PATH/environment_variables.txt - GEN_FILE_PATH=lib/generated FLUTTER_VERSION_FILE=$GEN_FILE_PATH/flutter_version.dart @@ -20,10 +17,6 @@ echo "const Map flutterVersion =" >"$FLUTTER_VERSION_FILE" flutter --version --machine >>"$FLUTTER_VERSION_FILE" echo ";" >>"$FLUTTER_VERSION_FILE" -mkdir -p "$ENV_FILE_PATH" || true -touch "$ENV_FILE" -export >"$ENV_FILE" - flutter pub global deactivate build_runner flutter pub global activate build_runner flutter pub run build_runner build --delete-conflicting-outputs diff --git a/src/ui/flutter_app/lib/screens/env_page.dart b/src/ui/flutter_app/lib/screens/env_page.dart deleted file mode 100644 index 25168c1e..00000000 --- a/src/ui/flutter_app/lib/screens/env_page.dart +++ /dev/null @@ -1,56 +0,0 @@ -/* - This file is part of Sanmill. - Copyright (C) 2019-2021 The Sanmill developers (see AUTHORS file) - - Sanmill is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - Sanmill is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . -*/ - -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart' show rootBundle; -import 'package:sanmill/generated/assets/assets.gen.dart'; -import 'package:sanmill/generated/intl/l10n.dart'; -import 'package:sanmill/shared/theme/app_theme.dart'; - -class EnvironmentVariablesPage extends StatelessWidget { - const EnvironmentVariablesPage({Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - return FutureBuilder( - future: rootBundle.loadString(Assets.files.environmentVariables), - builder: (context, data) { - late final String _data; - if (!data.hasData) { - _data = 'Nothing to show'; - } else { - _data = data.data!; - } - - return Scaffold( - appBar: AppBar( - title: Text(S.of(context).environmentVariables), - ), - body: SingleChildScrollView( - padding: const EdgeInsets.all(16), - child: Text( - _data, - style: AppTheme.licenseTextStyle, - textAlign: TextAlign.left, - ), - ), - ); - }, - ); - } -} diff --git a/src/ui/flutter_app/pubspec.yaml b/src/ui/flutter_app/pubspec.yaml index f683ae9d..fe422000 100644 --- a/src/ui/flutter_app/pubspec.yaml +++ b/src/ui/flutter_app/pubspec.yaml @@ -65,7 +65,6 @@ flutter: assets: - assets/licenses/GPL-3.0.txt - - assets/files/environment_variables.txt - assets/audios/draw.mp3 - assets/audios/fly.mp3 - assets/audios/go.mp3