documentation and todo items
This commit is contained in:
@@ -53,7 +53,7 @@ class MyApp extends ConsumerWidget {
|
|||||||
// This list holds the pages to navigate between
|
// This list holds the pages to navigate between
|
||||||
final List<Widget> _pages = [
|
final List<Widget> _pages = [
|
||||||
// Replace with the widget for your first page (e.g., HomeScreen())
|
// Replace with the widget for your first page (e.g., HomeScreen())
|
||||||
Center(child: ConversationsListWidget()),
|
const Center(child: ConversationsListWidget()),
|
||||||
// Replace with the widget for your second page (e.g., SettingsPage())
|
// Replace with the widget for your second page (e.g., SettingsPage())
|
||||||
const Center(child: SettingsWidget()),
|
const Center(child: SettingsWidget()),
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,12 +1,8 @@
|
|||||||
import '/components/conversation_options/conversation_options_widget.dart';
|
|
||||||
import 'package:flutterflow_ui/flutterflow_ui.dart';
|
import 'package:flutterflow_ui/flutterflow_ui.dart';
|
||||||
import 'conversations_list_widget.dart' show ConversationsListWidget;
|
import 'conversations_list_widget.dart' show ConversationsListWidget;
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:google_fonts/google_fonts.dart';
|
|
||||||
import 'package:provider/provider.dart';
|
|
||||||
|
|
||||||
class ConversationsListModel extends FlutterFlowModel<ConversationsListWidget> {
|
class ConversationsListModel extends FlutterFlowModel<ConversationsListWidget> {
|
||||||
/// State fields for stateful widgets in this page.
|
|
||||||
|
|
||||||
final unfocusNode = FocusNode();
|
final unfocusNode = FocusNode();
|
||||||
|
|
||||||
|
|||||||
@@ -1,20 +1,19 @@
|
|||||||
|
import 'package:app/theme.dart';
|
||||||
|
|
||||||
import 'package:app/pages/conversation_widget.dart';
|
import 'package:app/pages/conversation_widget.dart';
|
||||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
import 'package:app/components/conversation_options/conversation_options_widget.dart';
|
||||||
|
|
||||||
import '/components/conversation_options/conversation_options_widget.dart';
|
|
||||||
import 'package:flutterflow_ui/flutterflow_ui.dart';
|
import 'package:flutterflow_ui/flutterflow_ui.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:google_fonts/google_fonts.dart';
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
import 'package:provider/provider.dart';
|
|
||||||
|
|
||||||
import 'package:app/theme.dart';
|
|
||||||
|
|
||||||
import 'conversations_list_model.dart';
|
import 'conversations_list_model.dart';
|
||||||
export 'conversations_list_model.dart';
|
export 'conversations_list_model.dart';
|
||||||
|
|
||||||
final conversationIndex = ValueNotifier<int>(0);
|
final conversationIndex = ValueNotifier<int>(0);
|
||||||
|
|
||||||
|
// State controller using flutter_riverpod API.
|
||||||
|
// This handles changing between different conversations.
|
||||||
class MyState with ChangeNotifier {
|
class MyState with ChangeNotifier {
|
||||||
int get selectedIndex => conversationIndex.value;
|
int get selectedIndex => conversationIndex.value;
|
||||||
|
|
||||||
@@ -36,12 +35,10 @@ class _ConversationsListWidgetState extends State<ConversationsListWidget> {
|
|||||||
late ConversationsListModel _model;
|
late ConversationsListModel _model;
|
||||||
final selectedIndexProvider = StateProvider<int>((_) => 0); // Initial state
|
final selectedIndexProvider = StateProvider<int>((_) => 0); // Initial state
|
||||||
|
|
||||||
final List<Widget> _pages = [
|
final List<Widget> conversations = [
|
||||||
// Replace with the widget for your first page (e.g., HomeScreen())
|
|
||||||
Center(child: ConversationWidget()),
|
|
||||||
|
|
||||||
// TODO: Dynamically generate list of pages based upon existing conversations.
|
// TODO: Dynamically generate list of pages based upon existing conversations.
|
||||||
// This requires retrievable conversations from the server side.
|
// This requires retrievable conversations from the server side.
|
||||||
|
const Center(child: ConversationWidget()),
|
||||||
];
|
];
|
||||||
|
|
||||||
final scaffoldKey = GlobalKey<ScaffoldState>();
|
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||||
@@ -55,7 +52,6 @@ class _ConversationsListWidgetState extends State<ConversationsListWidget> {
|
|||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
_model.dispose();
|
_model.dispose();
|
||||||
|
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -186,9 +182,11 @@ class _ConversationsListWidgetState extends State<ConversationsListWidget> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
onTap: () => {
|
onTap: () => {
|
||||||
|
// TODO: Need to implement.
|
||||||
print("opening existing conversation")
|
print("opening existing conversation")
|
||||||
},
|
},
|
||||||
onLongPress: () => {
|
onLongPress: () => {
|
||||||
|
// TODO: Need to implement.
|
||||||
print("opening options")
|
print("opening options")
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user