CopyPastor

Detecting plagiarism made easy.

Score: 0.8217589259147644; Reported for: String similarity Open both answers

Possible Plagiarism

Plagiarized on 2021-09-13
by Jahidul Islam

Original Post

Original - Posted on 2018-12-24
by Max Zubko



            
Present in both answers; Present only in the new answer; Present only in the old answer;

Let's try with future builder ``` import 'package:api_practice/worker/data.dart'; import 'package:flutter/material.dart'; import 'package:api_practice/worker/data.dart';
class WeatherHome extends StatefulWidget { @override _WeatherHomeState createState() => _WeatherHomeState(); }
class _WeatherHomeState extends State<WeatherHome> { TextEditingController searchcont = TextEditingController(); DataClass datainstace = DataClass();


data() async { await datainstace.getcurrentlocation(); await datainstace.getdata(); print(datainstace.area); setState(() {}); }
@override Widget build(BuildContext context) { return Scaffold( body: Center( child: FutureBuilder( future: data(), builder: (context, snapshot) { if(snapshot.hasData){ return Container( width: double.maxFinite, height: MediaQuery.of(context).size.height * .999, color: Colors.blueGrey[900], child: Column( children: [ Stack( alignment: Alignment.center, children: [ Padding( padding: const EdgeInsets.fromLTRB(15, 60, 15, 15), child: TextField( decoration: InputDecoration( hintText: "Search City", hintStyle: TextStyle( color: Colors.blueGrey[700], fontSize: 17), focusColor: Colors.blueGrey[700], border: OutlineInputBorder( borderRadius: BorderRadius.circular(50), borderSide: BorderSide( width: 1, style: BorderStyle.solid, ), ), ), ), ), Positioned( bottom: 30, right: 26, child: Icon( Icons.search_rounded, size: 30, color: Colors.blueGrey[700], ), ), ], ), Text( ("${datainstace.area}"), style: TextStyle(fontSize: 25, color: Colors.white), ), Image.network( "${datainstace.iconurl}", width: 100, height: 100, fit: BoxFit.cover, ), ], ), ); } else{ return CircularProgressIndicator(); } } ), ), ); } } ```
class Loader extends StatefulWidget { @override State createState() => LoaderState(); } class LoaderState extends State<Loader> with SingleTickerProviderStateMixin { AnimationController controller; Animation<double> animation; @override void initState() { super.initState(); controller = AnimationController( duration: Duration(milliseconds: 1200), vsync: this); animation = CurvedAnimation(parent: controller, curve: Curves.elasticOut); animation.addListener(() { this.setState(() {}); }); animation.addStatusListener((AnimationStatus status) {}); controller.repeat(); } @override void dispose() { controller.dispose(); super.dispose(); } @override Widget build(BuildContext context) { return Column( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ Container( color: Colors.blue, height: 3.0, width: animation.value * 100.0, ), Padding( padding: EdgeInsets.only(bottom: 5.0), ), Container( color: Colors.blue[300], height: 3.0, width: animation.value * 75.0, ), Padding( padding: EdgeInsets.only(bottom: 5.0), ), Container( color: Colors.blue, height: 3.0, width: animation.value * 50.0, ) ], ); } } Expanded( child: Padding( padding: EdgeInsets.only(left: 20.0, right: 5.0, top:20.0), child: GestureDetector( onTap: () { Navigator.push( context, MaterialPageRoute( builder: (context) => FirstScreen())); }, child: Container( alignment: Alignment.center, height: 45.0, decoration: BoxDecoration( color: Color(0xFF1976D2), borderRadius: BorderRadius.circular(9.0)), child: Text('Login', style: TextStyle( fontSize: 20.0, color: Colors.white))), ), ), ),

        
Present in both answers; Present only in the new answer; Present only in the old answer;