We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
` import 'package:flutter/material.dart'; import 'package:http/http.dart' as http; import 'dart:convert';
class Loadding extends StatefulWidget { @OverRide _LoaddingState createState() => _LoaddingState(); }
class _LoaddingState extends State { void getTime() async {
http.Response response = await http.get(Uri.parse('https://jsonplaceholder.typicode.com/todos/1')); Map data = jsonDecode(response.body); print(data); print(data['title']);
}
@OverRide void initState() { super.initState(); getTime(); }
@OverRide Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text("loading"), centerTitle: true, ), body: Row( children: [ ElevatedButton.icon(onPressed: (){ Navigator.pushNamed(context, '/home'); }, icon: Icon(Icons.home), label: Text('Home')) ], ), ); }
} `
this will work fine.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
` import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
import 'dart:convert';
class Loadding extends StatefulWidget {
@OverRide
_LoaddingState createState() => _LoaddingState();
}
class _LoaddingState extends State {
void getTime() async {
}
@OverRide
void initState() {
super.initState();
getTime();
}
@OverRide
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("loading"),
centerTitle: true,
),
body: Row(
children: [
ElevatedButton.icon(onPressed: (){
Navigator.pushNamed(context, '/home');
}, icon: Icon(Icons.home), label: Text('Home'))
],
),
);
}
}
`
this will work fine.
The text was updated successfully, but these errors were encountered: