better utilize flutter_gen
This commit is contained in:
parent
a2c414f89a
commit
f993e975fe
|
@ -18,8 +18,8 @@
|
|||
|
||||
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/constants.dart';
|
||||
|
||||
class EnvironmentVariablesPage extends StatelessWidget {
|
||||
const EnvironmentVariablesPage({Key? key}) : super(key: key);
|
||||
|
@ -27,7 +27,7 @@ class EnvironmentVariablesPage extends StatelessWidget {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return FutureBuilder<String>(
|
||||
future: rootBundle.loadString(Constants.environmentVariablesFilename),
|
||||
future: rootBundle.loadString(Assets.files.environmentVariables),
|
||||
builder: (context, data) {
|
||||
late final String _data;
|
||||
if (!data.hasData) {
|
||||
|
|
|
@ -18,14 +18,14 @@
|
|||
|
||||
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/constants.dart';
|
||||
|
||||
class LicenseAgreementPage extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return FutureBuilder<String>(
|
||||
future: rootBundle.loadString(Constants.gplLicenseFilename),
|
||||
future: rootBundle.loadString(Assets.licenses.gpl30),
|
||||
builder: (context, data) {
|
||||
late final String _data;
|
||||
if (!data.hasData) {
|
||||
|
|
|
@ -28,9 +28,6 @@ class Constants {
|
|||
|
||||
static String settingsFilename = "${projectNameLower}_settings.json";
|
||||
static const String crashLogsFileName = "$projectName-crash-logs.txt";
|
||||
static const String environmentVariablesFilename =
|
||||
"assets/files/environment_variables.txt";
|
||||
static const String gplLicenseFilename = "assets/licenses/GPL-3.0.txt";
|
||||
|
||||
static const String feedbackSubjectPrefix = "[$appName] $projectName ";
|
||||
static const String feedbackSubjectSuffix = " Feedback";
|
||||
|
|
Loading…
Reference in New Issue