Removed modal style
This commit is contained in:
parent
a69622250b
commit
a9fed3e36d
|
|
@ -536,12 +536,6 @@ class _MainAppState extends State<MainApp> {
|
||||||
}
|
}
|
||||||
showModalBottomSheet(
|
showModalBottomSheet(
|
||||||
context: context,
|
context: context,
|
||||||
barrierColor: (Theme.of(context)
|
|
||||||
.brightness ==
|
|
||||||
Brightness.dark)
|
|
||||||
? Colors.grey
|
|
||||||
.withOpacity(0.2)
|
|
||||||
: null,
|
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
return Container(
|
return Container(
|
||||||
padding:
|
padding:
|
||||||
|
|
@ -1266,11 +1260,6 @@ class _MainAppState extends State<MainApp> {
|
||||||
}
|
}
|
||||||
showModalBottomSheet(
|
showModalBottomSheet(
|
||||||
context: context,
|
context: context,
|
||||||
barrierColor:
|
|
||||||
(Theme.of(context).brightness ==
|
|
||||||
Brightness.dark)
|
|
||||||
? Colors.grey.withOpacity(0.2)
|
|
||||||
: null,
|
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
return Container(
|
return Container(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
|
|
|
||||||
|
|
@ -54,10 +54,7 @@ Widget toggle(BuildContext context, String text, bool value,
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
left: (icon == null) ? 16 : 32, right: 16, top: 12),
|
left: (icon == null) ? 16 : 32, right: 16, top: 12),
|
||||||
child: Divider(
|
child: Divider(color: Theme.of(context).dividerColor)),
|
||||||
color: (Theme.of(context).brightness == Brightness.light)
|
|
||||||
? Colors.grey[300]
|
|
||||||
: Colors.grey[900])),
|
|
||||||
Row(mainAxisSize: MainAxisSize.max, children: [
|
Row(mainAxisSize: MainAxisSize.max, children: [
|
||||||
(icon != null)
|
(icon != null)
|
||||||
? Padding(
|
? Padding(
|
||||||
|
|
@ -366,7 +363,9 @@ class _ScreenSettingsState extends State<ScreenSettings> {
|
||||||
child: SizedBox(height: 200, child: MoveWindow()))
|
child: SizedBox(height: 200, child: MoveWindow()))
|
||||||
]),
|
]),
|
||||||
actions: desktopControlsActions(context)),
|
actions: desktopControlsActions(context)),
|
||||||
body: Padding(
|
body: Center(
|
||||||
|
child: Container(
|
||||||
|
constraints: const BoxConstraints(maxWidth: 1200),
|
||||||
padding: const EdgeInsets.only(left: 16, right: 16),
|
padding: const EdgeInsets.only(left: 16, right: 16),
|
||||||
child: LayoutBuilder(builder: (context, constraints) {
|
child: LayoutBuilder(builder: (context, constraints) {
|
||||||
var column1 =
|
var column1 =
|
||||||
|
|
@ -386,8 +385,8 @@ class _ScreenSettingsState extends State<ScreenSettings> {
|
||||||
checkHost();
|
checkHost();
|
||||||
},
|
},
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
labelText:
|
labelText: AppLocalizations.of(context)!
|
||||||
AppLocalizations.of(context)!.settingsHost,
|
.settingsHost,
|
||||||
hintText: "http://localhost:11434",
|
hintText: "http://localhost:11434",
|
||||||
prefixIcon: IconButton(
|
prefixIcon: IconButton(
|
||||||
tooltip: AppLocalizations.of(context)!
|
tooltip: AppLocalizations.of(context)!
|
||||||
|
|
@ -437,8 +436,8 @@ class _ScreenSettingsState extends State<ScreenSettings> {
|
||||||
selectionHaptic();
|
selectionHaptic();
|
||||||
checkHost();
|
checkHost();
|
||||||
},
|
},
|
||||||
icon:
|
icon: const Icon(
|
||||||
const Icon(Icons.save_rounded),
|
Icons.save_rounded),
|
||||||
)),
|
)),
|
||||||
border: const OutlineInputBorder(),
|
border: const OutlineInputBorder(),
|
||||||
error: (hostInvalidHost || hostInvalidUrl)
|
error: (hostInvalidHost || hostInvalidUrl)
|
||||||
|
|
@ -492,11 +491,13 @@ class _ScreenSettingsState extends State<ScreenSettings> {
|
||||||
color: Colors.grey),
|
color: Colors.grey),
|
||||||
const SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
Text(
|
Text(
|
||||||
AppLocalizations.of(context)!
|
AppLocalizations.of(
|
||||||
|
context)!
|
||||||
.settingsHostChecking,
|
.settingsHostChecking,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
color: Colors.grey,
|
color: Colors.grey,
|
||||||
fontFamily: "monospace"))
|
fontFamily:
|
||||||
|
"monospace"))
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
: Row(
|
: Row(
|
||||||
|
|
@ -509,22 +510,26 @@ class _ScreenSettingsState extends State<ScreenSettings> {
|
||||||
.primary)),
|
.primary)),
|
||||||
const SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
Text(
|
Text(
|
||||||
AppLocalizations.of(context)!
|
AppLocalizations.of(
|
||||||
|
context)!
|
||||||
.settingsHostValid,
|
.settingsHostValid,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.green
|
color: Colors.green
|
||||||
.harmonizeWith(
|
.harmonizeWith(
|
||||||
Theme.of(context)
|
Theme.of(
|
||||||
|
context)
|
||||||
.colorScheme
|
.colorScheme
|
||||||
.primary),
|
.primary),
|
||||||
fontFamily: "monospace"))
|
fontFamily:
|
||||||
|
"monospace"))
|
||||||
],
|
],
|
||||||
))))
|
))))
|
||||||
]);
|
]);
|
||||||
var column2 =
|
var column2 =
|
||||||
Column(mainAxisSize: MainAxisSize.min, children: [
|
Column(mainAxisSize: MainAxisSize.min, children: [
|
||||||
button(
|
button(
|
||||||
AppLocalizations.of(context)!.settingsTitleBehavior,
|
AppLocalizations.of(context)!
|
||||||
|
.settingsTitleBehavior,
|
||||||
Icons.psychology_rounded, () {
|
Icons.psychology_rounded, () {
|
||||||
selectionHaptic();
|
selectionHaptic();
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
|
|
@ -581,7 +586,8 @@ class _ScreenSettingsState extends State<ScreenSettings> {
|
||||||
context: context,
|
context: context,
|
||||||
description:
|
description:
|
||||||
"\n${AppLocalizations.of(context)!.settingsDescriptionExport}"),
|
"\n${AppLocalizations.of(context)!.settingsDescriptionExport}"),
|
||||||
button(AppLocalizations.of(context)!.settingsTitleAbout,
|
button(
|
||||||
|
AppLocalizations.of(context)!.settingsTitleAbout,
|
||||||
Icons.help_rounded, () {
|
Icons.help_rounded, () {
|
||||||
selectionHaptic();
|
selectionHaptic();
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
|
|
@ -605,7 +611,8 @@ class _ScreenSettingsState extends State<ScreenSettings> {
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize:
|
||||||
|
MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
column1,
|
column1,
|
||||||
Expanded(
|
Expanded(
|
||||||
|
|
@ -616,7 +623,8 @@ class _ScreenSettingsState extends State<ScreenSettings> {
|
||||||
highlightColor:
|
highlightColor:
|
||||||
Colors.transparent,
|
Colors.transparent,
|
||||||
enableFeedback: false,
|
enableFeedback: false,
|
||||||
hoverColor: Colors.transparent,
|
hoverColor:
|
||||||
|
Colors.transparent,
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
if (iconSize != 1) return;
|
if (iconSize != 1) return;
|
||||||
heavyHaptic();
|
heavyHaptic();
|
||||||
|
|
@ -661,7 +669,8 @@ class _ScreenSettingsState extends State<ScreenSettings> {
|
||||||
.primary)),
|
.primary)),
|
||||||
)
|
)
|
||||||
])),
|
])),
|
||||||
verticalTitleDivider(context: context),
|
verticalTitleDivider(
|
||||||
|
context: context),
|
||||||
Expanded(child: column2)
|
Expanded(child: column2)
|
||||||
])
|
])
|
||||||
: ListView(children: [
|
: ListView(children: [
|
||||||
|
|
@ -688,6 +697,7 @@ class _ScreenSettingsState extends State<ScreenSettings> {
|
||||||
color: Colors.grey.harmonizeWith(
|
color: Colors.grey.harmonizeWith(
|
||||||
Theme.of(context).colorScheme.primary))
|
Theme.of(context).colorScheme.primary))
|
||||||
]);
|
]);
|
||||||
})))));
|
})),
|
||||||
|
))));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -345,10 +345,6 @@ class _ScreenSettingsInterfaceState extends State<ScreenSettingsInterface> {
|
||||||
selectionHaptic();
|
selectionHaptic();
|
||||||
showModalBottomSheet(
|
showModalBottomSheet(
|
||||||
context: context,
|
context: context,
|
||||||
barrierColor: (Theme.of(context).brightness ==
|
|
||||||
Brightness.dark)
|
|
||||||
? Colors.grey.withOpacity(0.2)
|
|
||||||
: null,
|
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
return StatefulBuilder(
|
return StatefulBuilder(
|
||||||
builder: (context, setState) {
|
builder: (context, setState) {
|
||||||
|
|
|
||||||
|
|
@ -180,10 +180,6 @@ class _ScreenSettingsVoiceState extends State<ScreenSettingsVoice> {
|
||||||
|
|
||||||
showModalBottomSheet(
|
showModalBottomSheet(
|
||||||
context: context,
|
context: context,
|
||||||
barrierColor:
|
|
||||||
(Theme.of(context).brightness == Brightness.dark)
|
|
||||||
? Colors.grey.withOpacity(0.2)
|
|
||||||
: null,
|
|
||||||
builder:
|
builder:
|
||||||
(context) => StatefulBuilder(
|
(context) => StatefulBuilder(
|
||||||
builder: (context, setLocalState) {
|
builder: (context, setLocalState) {
|
||||||
|
|
|
||||||
|
|
@ -290,11 +290,7 @@ void setModel(BuildContext context, Function setState) {
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
showModalBottomSheet(
|
showModalBottomSheet(
|
||||||
context: context,
|
context: context, builder: (context) => Container(child: content));
|
||||||
barrierColor: (Theme.of(context).brightness == Brightness.dark)
|
|
||||||
? Colors.grey.withOpacity(0.2)
|
|
||||||
: null,
|
|
||||||
builder: (context) => Container(child: content));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -506,9 +502,6 @@ Future<String> prompt(BuildContext context,
|
||||||
String? error;
|
String? error;
|
||||||
await showModalBottomSheet(
|
await showModalBottomSheet(
|
||||||
context: context,
|
context: context,
|
||||||
barrierColor: (Theme.of(context).brightness == Brightness.dark)
|
|
||||||
? Colors.grey.withOpacity(0.2)
|
|
||||||
: null,
|
|
||||||
isScrollControlled: true,
|
isScrollControlled: true,
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
return StatefulBuilder(builder: (context, setLocalState) {
|
return StatefulBuilder(builder: (context, setLocalState) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue