mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2026-10-25 05:27:56 +00:00
Implemented Navigation to these screens:
- Home - Scene - Smart - profile Converted to state based Provider
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class SmartProvider extends ChangeNotifier {}
|
||||
@@ -0,0 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'smart_state.dart';
|
||||
|
||||
class SmartProvider extends ChangeNotifier {
|
||||
final state = SmartState();
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
class SmartState {
|
||||
|
||||
SmartState() {
|
||||
// init some variables
|
||||
}
|
||||
}
|
||||
@@ -1,17 +1,17 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import '../provider/smart_provider.dart';
|
||||
import 'smart_provider.dart';
|
||||
|
||||
class SmartView extends StatelessWidget {
|
||||
const SmartView({super.key});
|
||||
class SmartPage extends StatelessWidget {
|
||||
const SmartPage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ChangeNotifierProvider(
|
||||
create: (BuildContext context) => SmartProvider(),
|
||||
builder: (context, child) => const Center(
|
||||
child: Text('Smart'),
|
||||
child: Text('Smart Page'),
|
||||
),
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user