#23 Upgrade MaterialUI

General UI improvements and cleanup
This commit is contained in:
2024-02-07 21:17:30 +01:00
parent 538ebd27bf
commit 095b663bf1
11 changed files with 43 additions and 173 deletions

View File

@ -84,9 +84,8 @@ class _ChatTextfieldState extends State<ChatTextfield> {
Align(
alignment: Alignment.bottomLeft,
child: Container(
padding: const EdgeInsets.only(left: 10, bottom: 1, top: 1, right: 10),
padding: const EdgeInsets.only(left: 10, bottom: 3, top: 3, right: 10),
width: double.infinity,
color: Theme.of(context).primaryColor,
child: Row(
children: <Widget>[
GestureDetector(
@ -135,7 +134,7 @@ class _ChatTextfieldState extends State<ChatTextfield> {
color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.circular(30),
),
child: const Icon(Icons.add, color: Colors.white, size: 20, ),
child: const Icon(Icons.attach_file_outlined, color: Colors.white, size: 20, ),
),
)
),
@ -144,18 +143,13 @@ class _ChatTextfieldState extends State<ChatTextfield> {
child: TextField(
autocorrect: true,
textCapitalization: TextCapitalization.sentences,
style: const TextStyle(
color: Colors.white,
),
controller: _textBoxController,
maxLines: 7,
minLines: 1,
decoration: InputDecoration(
decoration: const InputDecoration(
hintText: "Nachricht schreiben...",
hintStyle: TextStyle(color: Theme.of(context).colorScheme.onSecondary),
border: InputBorder.none,
),
cursorColor: Colors.white,
onChanged: (String text) {
if(text.trim().toLowerCase() == "marbot marbot marbot") {
var newText = "Roboter sind cool und so, aber marbots sind besser!";

View File

@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_split_view/flutter_split_view.dart';
import 'package:persistent_bottom_nav_bar/persistent_tab_view.dart';
import 'package:persistent_bottom_nav_bar_v2/persistent-tab-view.dart';
class TalkNavigator {
static bool hasSplitViewState(BuildContext context) => context.findAncestorStateOfType<SplitViewState>() != null;
@ -12,7 +12,7 @@ class TalkNavigator {
SplitViewState splitView = SplitView.of(context);
overrideToSingleSubScreen ? splitView.setSecondary(view) : splitView.push(view);
} else {
PersistentNavBarNavigator.pushNewScreen(context, screen: view, withNavBar: false);
pushNewScreen(context, screen: view, withNavBar: false);
}
}
}