Animate opacity with AnimatedOpacity widget – Pick a widget property to animate

@override Widget build(BuildContext context) {  return ListView(children: <Widget>[   Image.network(owlUrl),   TextButton(    child: const Text(     ‘Show Details’,     style: TextStyle(color: Colors.blueAccent),    ),    onPressed: () => {},   ),   const Column(    children: [     Text(‘Type: Owl’),     Text(‘Age: 39’),     Text(‘Employment: None’),    ],   ),   AnimatedOpacity(    child: const Column(     children: [      Text(‘Type: Owl’),      Text(‘Age: 39’),      Text(‘Employment: None’),     ],    ),   ),  ]); }

Published
Categorized as Dart Tagged

Tween

Derived from Animatable<T> and used to generate numbers between any two numbers other than 0 and 1. It can be used along with Animation object by using animate method and passing actual Animation object. AnimationController controller = AnimationController( duration: const Duration(milliseconds: 1000), vsync: this); Animation<int> customTween = IntTween( begin: 0, end: 255).animate(controller); Tween can also… Continue reading Tween

Published
Categorized as Dart Tagged

CurvedAnimation

Similar to AnimationController but supports non-linear animation. CurvedAnimation can be used along with Animation object as below − controller = AnimationController(duration: const Duration(seconds: 2), vsync: this); animation = CurvedAnimation(parent: controller, curve: Curves.easeIn)

Published
Categorized as Dart Tagged

Animation

Generates interpolated values between two numbers over a certain duration. The most common Animation classes are − Animation<double> − interpolate values between two decimal number Animation<Color> − interpolate colors between two color Animation<Size> − interpolate sizes between two size AnimationController − Special Animation object to control the animation itself. It generates new values whenever the application is ready for… Continue reading Animation

Published
Categorized as Dart Tagged

Flutter – Database Concepts (SQLite)

SQLite database is the de-facto and standard SQL based embedded database engine. It is small and time-tested database engine. sqflite package provides a lot of functionality to work efficiently with SQLite database. It provides standard methods to manipulate SQLite database engine. The core functionality provided by sqflite package is as follows − Create / Open… Continue reading Flutter – Database Concepts (SQLite)

Published
Categorized as Dart Tagged

Dart Boolean

Dart Boolean data type is used to check whether a given statement true or false. The true and false are the two values of the Boolean type, which are both compile-time constants. In Dart, The numeric value 1 or 0 cannot be used to specify the true or false. The bool keyword is used to represent the Boolean value. The syntax of declaring the Boolean… Continue reading Dart Boolean

Dart Interfaces

An interface defines the syntax that any entity must adhere to. Dart does not have any separate syntax to define interfaces. An Interface defines the same as the class where any set of methods can be accessed by an object. The Class declaration can interface itself. The keyword implement is needed to be writing, followed… Continue reading Dart Interfaces

Using super keyword with constructor

We can use the super keyword to access the parent class constructor. The super keyword can call both parameterized and non-parameterized constructors depending on the situation. The syntax is given below. Syntax: :super();  Example – // Base class called Parent   class Parent   {        Parent()        {            print(“This is the super class constructor”);        }    }       // Child class Super   class Child extends Parent    {                   Child():super()   // Calling super class constructor       {                            print(“This is the sub class constructor”);        }    }      void main() {    // Creating object of sub class  … Continue reading Using super keyword with constructor

Dart – Super keyword

In Dart, super keyword is used to refer immediate parent class object. It is used to call properties and methods of the superclass. It does not call the method, whereas when we create an instance of subclass than that of the parent class is created implicitly so super keyword calls that instance. Advantages of super keyword: It… Continue reading Dart – Super keyword