Updated feedback to include screenshot and drawings
This commit is contained in:
@ -92,7 +92,6 @@ class _ChatViewState extends State<ChatView> {
|
||||
}
|
||||
|
||||
return Scaffold(
|
||||
backgroundColor: const Color(0xffefeae2),
|
||||
appBar: ClickableAppBar(
|
||||
onTap: () {
|
||||
TalkNavigator.pushSplitView(context, ChatInfo(widget.room));
|
||||
|
@ -121,7 +121,7 @@ class _ChatTileState extends State<ChatTile> {
|
||||
onTap: () async {
|
||||
setCurrentAsRead();
|
||||
ChatView view = ChatView(room: widget.data, selfId: username, avatar: circleAvatar);
|
||||
TalkNavigator.pushSplitView(context, view, overrideToSingleSubScreen: true);
|
||||
TalkNavigator.pushSplitView(context, view, onSecondaryScreen: true);
|
||||
Provider.of<ChatProps>(context, listen: false).setQueryToken(widget.data.token);
|
||||
},
|
||||
onLongPress: () {
|
||||
|
@ -1,18 +1,17 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_split_view/flutter_split_view.dart';
|
||||
import 'package:persistent_bottom_nav_bar_v2/persistent-tab-view.dart';
|
||||
|
||||
class TalkNavigator {
|
||||
static bool hasSplitViewState(BuildContext context) => context.findAncestorStateOfType<SplitViewState>() != null;
|
||||
static bool isSecondaryVisible(BuildContext context) => hasSplitViewState(context) && SplitView.of(context).isSecondaryVisible;
|
||||
|
||||
static void pushSplitView(BuildContext context, Widget view, {bool overrideToSingleSubScreen = false}) {
|
||||
static void pushSplitView(BuildContext context, Widget view, {bool onSecondaryScreen = false}) {
|
||||
if(isSecondaryVisible(context)) {
|
||||
SplitViewState splitView = SplitView.of(context);
|
||||
overrideToSingleSubScreen ? splitView.setSecondary(view) : splitView.push(view);
|
||||
onSecondaryScreen ? splitView.setSecondary(view) : splitView.push(view);
|
||||
} else {
|
||||
pushNewScreen(context, screen: view, withNavBar: false);
|
||||
Navigator.of(context).push(MaterialPageRoute(builder: (context) => view));
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user