whatsupcoders / flutter-interview-questions Goto Github PK
View Code? Open in Web Editor NEWThis repo contains a list of helpful Flutter related questions you can use to interview potential candidates.
License: MIT License
This repo contains a list of helpful Flutter related questions you can use to interview potential candidates.
License: MIT License
import 'dart:io';
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_app_retrofit/example.dart';
class Homepage extends StatefulWidget {
@override
HomepageState createState() => HomepageState();
}
class _HomepageState extends State<Homepage> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
body: Center(
child: FutureBuilder(
future: this._getPosts(),
builder: (context, snapshot) {
switch (snapshot.connectionState) {
case ConnectionState.none:
return CircularProgressIndicator();
break;
case ConnectionState.waiting:
return CircularProgressIndicator();
break;
case ConnectionState.active:
return CircularProgressIndicator();
break;
case ConnectionState.done:
return CircularProgressIndicator();
break;
default:
return CircularProgressIndicator();
}
},),
),
);
}
Future _getPosts() async {
final dio= Dio();
(dio.httpClientAdapter as DefaultHttpClientAdapter).onHttpClientCreate = await (client) async {
SecurityContext securityContext=new SecurityContext();
final ByteData crtData = await rootBundle.load('assets/server.crt');
securityContext.setTrustedCertificatesBytes(crtData.buffer.asUint8List());
final ByteData keyBytes = await rootBundle.load('assets/server.key');
securityContext.usePrivateKeyBytes(keyBytes.buffer.asUint8List());
return HttpClient(context: securityContext);
};
final client = RestClient(dio);
client.login('madhusudhan@****.in', '88888');
}}
In flutter we are getting using Dio. I am getting a error using Dio The problem is here that i need to use SSl certificate So i used Dio But now i am getting the below error. Unhandled exception Future is not a subtype of HttpClient.
Maybe someone could answer those questions :)
This could become the best flutter interview preparation source.
[class Internal extends StatefulWidget{
@override
_InternalState createState()=>_InternalState();
}
class _InternalState extends State<Internal> {
bool isSearching=false;
Photo(int number,){
return Scaffold(
backgroundColor: Color(0XFFfffafa),
body: SafeArea(
child: SingleChildScrollView(
child: Container(
child: Stack(
children: <Widget>[
Container(
height: 19,
child: Padding(
padding: const EdgeInsets.only(right:360.0),
child: IconButton(icon: Icon(Icons.arrow_back,color: Colors.black,size: 30,), onPressed: (){
Navigator.push(
context,
MaterialPageRoute(builder: (context) => Internal()),
);
}),
),
),
Title1(number),
ClipRRect(
borderRadius: BorderRadius.only(topRight: Radius.circular(40.0),topLeft: Radius.circular(40.0)),
child: Image(image: AssetImage('images/song$number.jpg'),),
),
],
),
),
),
),
Title1(int number){
number=1;
Container(
margin: EdgeInsets.only(left:37.0,right: 37,bottom: 10),
child: Center(child: Text('Tempo : 102\nStyle : Waltz\nChord : C\nTranspose : 4',
style: TextStyle(color: Colors.white,fontFamily: 'SourceSansPro',fontWeight: FontWeight.w600,fontSize: 20),)),
height: 120.0,
width: 380,
decoration: BoxDecoration(shape: BoxShape.rectangle,color: Color(0XFF40404F),borderRadius: BorderRadius.circular(20.0)),
);
number=2;
Container(
margin: EdgeInsets.only(left:37.0,right: 37,bottom: 10),
child: Center(child: Text('Tempo : 102\nStyle : Waltz\nChord : C\nTranspose : 2',
style: TextStyle(color: Colors.white,fontFamily: 'SourceSansPro',fontWeight: FontWeight.w600,fontSize: 20),)),
height: 120.0,
width: 380,
decoration: BoxDecoration(shape: BoxShape.rectangle,color: Color(0XFF40404F),borderRadius: BorderRadius.circular(20.0)),
);
}
);
}
Hey @whatsupcoders
I was wondering if we can categorize the questions based on the developer level. From my experience, not all questions are made for Junior developers. However, this is open to suggestions.
I am looking at the following category:
1. Senior Developer
2. Junior Developer
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.