Files
Auto-GPT/lib/main.dart
hunteraraujo 6e2d325994 Refactor UI with New Widgets and Provider Integration
In this commit, the app underwent significant UI improvements by leveraging new, more modular widgets (NewTaskButton and TaskListTile). This ensures better code maintainability and a cleaner architecture.

Key changes include:

Integrated ChangeNotifierProvider in main.dart to facilitate the creation and broadcasting of TaskViewModel.
Refactored TaskView to utilize the newly created NewTaskButton and TaskListTile widgets.
Updated MainLayout to reflect the changes and provide a more cohesive user experience.
2023-08-23 08:31:54 -07:00

27 lines
713 B
Dart

import 'package:flutter/material.dart';
import 'views/main_layout.dart';
import 'package:provider/provider.dart';
import 'package:auto_gpt_flutter_client/viewmodels/task_viewmodel.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key); // Corrected the constructor
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'AutoGPT Flutter Client',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: ChangeNotifierProvider(
create: (context) => TaskViewModel(),
child: const MainLayout(),
), // Set MainLayout as the home screen of the app
);
}
}