Giter Site home page Giter Site logo

flutter-interview-questions's Introduction

Awesome Flutter

Flutter Interview Questions

This file contains a number of Flutter interview questions.

Note: Keep in mind that many of these questions are open-ended and could lead to interesting discussions.


Title: Flutter Interview Questions

  • What is the difference between a StatelessWidget and a StatefulWidget in Flutter?
  • Explain the Stateful Widget Lifecycle?
  • When do you use the WidgetsBindingObserver?
  • What is Flutter tree shaking?
  • What is a Spacer widget?
  • What is the difference between hot restart and hot reload?
  • What is an InheritedWidget? List some examples.
  • Why is the build() method on State and not StatefulWidgets?
  • What is a pubspec file in Dart?
  • How is Flutter native?
  • What is a Navigator and what are Routes in Flutter?
  • What is a PageRoute?
  • Explain async, await and Futures.
  • How can you update a ListView dynamically?
  • What is a Stream?
  • What are keys in Flutter and when should you use it?
  • What are GlobalKeys?
  • When should you use mainAxisAlignment and crossAxisAlignment?
  • When can you use double.INFINITY?
  • What is Ticker, Tween and AnimatedBuilder?
  • What is ephemeral state?
  • What is an AspectRatio widget used for?
  • How would you access StatefulWidget properties from its State?
  • Is there a suggested limit to the number of FloatingActionButtons a screen can have? Give a reason(s) for your answer
  • Mention two or more operations that would require you to use or return a Future.
  • What is the purpose of a SafeArea?
  • When to use a mainAxisSize?
  • SizedBox VS Container?
  • List the Visibility widgets in flutter and the differences?
  • Can we use Color and Decoration property simultaneously in the Container? Explain
  • Inorder for the CrossAxisAlignment.baseline to work what is another property that we need to set?
  • when should we use a resizeToAvoidBottomInset?
  • What is the difference between 'as','show' and 'hide' in an import statement?
  • What is the importance of a TextEditingController?
  • Why do we use a Reverse property in a Listview?
  • Difference between a Modal and Persistent BottomSheet with an example?
  • How is an Inherited Widget different from a Provider?
  • What is an UnmodifiableListView?
  • Difference between these operators "?? and ?."
  • What is the purpose of ModalRoute.of()?
  • Difference between a Navigator.pushNamed and Navigator.pushReplacementNamed?
  • Difference between a Single Instance and Scoped Instance ?

Title: Animation Interview Questions

  • What is a vsync?
  • When does the animation reach completed or dismissed status?
  • Difference between `AnimationController and Animation?
  • When to use a SingleTickerProviderStateMixin and TickerProviderStateMixin?
  • Define a TweenAnimation ?
  • State the importance of a Ticker ?
  • Why do we need a mixins ?

Title: FireStore Interview Questions

  • Difference between getDocuments() vs snapshots()?

Getting Involved

  1. How to Contribute
  2. License

Contributors:

This project is currently maintained by:

Feeling inspired? Check our Contributing guide to get started!

flutter-interview-questions's People

Contributors

johngorithm avatar lucalves avatar thinkdigitalsoftware avatar whatsupcoders avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flutter-interview-questions's Issues

I am new to flutter and i am developing flutter app I want to call a function inside the column but it said null values.i have tried to show the Title1() function inside the Photo() class but it shows error.

[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)),
      );
    }
    );
  }

Answers?

Maybe someone could answer those questions :)

This could become the best flutter interview preparation source.

Future<HttpClient> is not a subtype of HttpClient

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.

Categorize Questions based on Developer Level

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.