You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import 'package:flutter/material.dart';
class Home extends StatefulWidget { @OverRide
_HomeState createState() => _HomeState();
}
class _HomeState extends State {
Map data={};
dynamic result; @OverRide
Widget build(BuildContext context) {
data = data.isNotEmpty? data : ModalRoute.of(context).settings.arguments;
My home.dart:
import 'package:flutter/material.dart';
class Home extends StatefulWidget {
@OverRide
_HomeState createState() => _HomeState();
}
class _HomeState extends State {
Map data={};
dynamic result;
@OverRide
Widget build(BuildContext context) {
data = data.isNotEmpty? data : ModalRoute.of(context).settings.arguments;
// Exception has occurred.
// FlutterError (setState() called after dispose():
// if(result!=0){
// print("11");
// data = {
// 'location': result['location'],
// 'flag': result['flag'],
// 'time': result['time'],
// 'isdaytime': result['isdaytime'],
// };
// print(data);
// // setState(() {
// // print("12");
// // data = {
// // 'location': result['location'],
// // 'flag': result['flag'],
// // 'time': result['time'],
// // 'isdaytime': result['isdaytime'],
// // };
// // print(data['location']);
// // });
// }
}
}
The text was updated successfully, but these errors were encountered: