11/1/9
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import 'package:chat_gpt_flutter/chat_gpt_flutter.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:ride/constant/colors.dart';
|
||||
import 'package:ride/constant/credential.dart';
|
||||
|
||||
class BottomBarController extends GetxController {
|
||||
var currentIndex = 0.obs;
|
||||
@@ -23,11 +25,11 @@ class HomeScreen extends StatelessWidget {
|
||||
),
|
||||
body: Obx(() => IndexedStack(
|
||||
index: controller.currentIndex.value,
|
||||
children: const [
|
||||
HomeView(),
|
||||
ProfileView(),
|
||||
StatisticsView(),
|
||||
WalletView(),
|
||||
children: [
|
||||
HomeView(chatGpt: ChatGpt(apiKey: AppCredintials.chatGPTkey)),
|
||||
const ProfileView(),
|
||||
const StatisticsView(),
|
||||
const WalletView(),
|
||||
],
|
||||
)),
|
||||
bottomNavigationBar: Obx(() => BottomNavigationBar(
|
||||
@@ -70,12 +72,17 @@ class HomeScreen extends StatelessWidget {
|
||||
}
|
||||
|
||||
class HomeView extends StatelessWidget {
|
||||
const HomeView({super.key});
|
||||
|
||||
const HomeView({super.key, required this.chatGpt});
|
||||
final ChatGpt chatGpt;
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const Center(
|
||||
child: Text('Home View'),
|
||||
Map<String, dynamic> data;
|
||||
return Center(
|
||||
child: Column(
|
||||
children: [
|
||||
Text('Home View'),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user