mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-29 20:04:30 +01:00
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.
27 lines
713 B
Dart
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
|
|
);
|
|
}
|
|
}
|