Fix text appearance on download page.
This commit is contained in:
parent
3d89d73af1
commit
920b8488c7
|
@ -1,7 +1,6 @@
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:file_picker/file_picker.dart';
|
import 'package:file_picker/file_picker.dart';
|
||||||
import 'package:flutter/gestures.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:gettext_i18n/gettext_i18n.dart';
|
import 'package:gettext_i18n/gettext_i18n.dart';
|
||||||
|
|
||||||
|
@ -9,6 +8,7 @@ import '../../globals.dart';
|
||||||
import '../../mixins/preferences_mixin.dart';
|
import '../../mixins/preferences_mixin.dart';
|
||||||
import '../home_page/home_page_button_group.dart';
|
import '../home_page/home_page_button_group.dart';
|
||||||
|
|
||||||
|
|
||||||
class DownloaderMenu extends StatefulWidget {
|
class DownloaderMenu extends StatefulWidget {
|
||||||
const DownloaderMenu({Key? key}) : super(key: key);
|
const DownloaderMenu({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@ -43,14 +43,23 @@ class _DownloaderMenuState extends State<DownloaderMenu> with PreferencesMixin {
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
"${context.t('Directory where the machines are stored')}:",
|
"${context.t('Directory where the machines are stored')}:",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Theme.of(context).brightness == Brightness.dark
|
||||||
|
? Theme.of(context).colorScheme.onSurface
|
||||||
|
: Theme.of(context).colorScheme.onPrimary,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
width: 8,
|
width: 8,
|
||||||
),
|
),
|
||||||
Text.rich(
|
ElevatedButton(
|
||||||
TextSpan(
|
style: ElevatedButton.styleFrom(
|
||||||
recognizer: TapGestureRecognizer()
|
foregroundColor: Theme.of(context).brightness == Brightness.dark
|
||||||
..onTap = () async {
|
? Colors.white70
|
||||||
|
: Theme.of(context).colorScheme.primary,
|
||||||
|
backgroundColor: Theme.of(context).canvasColor,
|
||||||
|
),
|
||||||
|
onPressed: () async {
|
||||||
var folder = await FilePicker.platform
|
var folder = await FilePicker.platform
|
||||||
.getDirectoryPath(dialogTitle: "Pick a folder");
|
.getDirectoryPath(dialogTitle: "Pick a folder");
|
||||||
if (folder != null) {
|
if (folder != null) {
|
||||||
|
@ -61,10 +70,7 @@ class _DownloaderMenuState extends State<DownloaderMenu> with PreferencesMixin {
|
||||||
prefWorkingDirectory, Directory.current.path);
|
prefWorkingDirectory, Directory.current.path);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
text: Directory.current.path,
|
child: Text(Directory.current.path),
|
||||||
style: TextStyle(
|
|
||||||
color: Theme.of(context).colorScheme.primary),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in New Issue