Method Cascading In Flutter

Method Cascading In Flutter :

Method cascading is syntax which allows multiple methods to be called on the same object. sDart implements cascades, using a double-dot .. “cascaded method invocation operation”.

building complex objects (lots of property configuration)
making objects better for encapsulation. return this makes objects too open.
building objects faster with nested cascade.
less lines of code.

Method Cascading In Flutter
class Student { 
   void test_method() { 
      print("This is a  test method"); 
   void test_method1() { 
      print("This is a  test method1"); 
void main() { 
   new Student() 

var address = getAddress();
address.setStreet("", ""); = ""
address.state = "", extended: 6666);

  ..setStreet("", ""); = ""ss
  ..state = "", extended: 6666);

class ChainCalculator {
  double _accumulator = 0.0;

  ChainCalculator(double initVal) {
    this._accumulator = initVal;

  ChainCalculator add(double val) {
    this._accumulator += val;
    return this;

  ChainCalculator subtract(double val) {
    this._accumulator -= val;
    return this;

  double result() {
    return this._accumulator;

Calculator calculator = Calculator(0.0)

print("Result: " + calculator.result().toString());

The flutter tutorial  is a website that bring you the latest and amazing resources of code. All the languages codes are included in this website. The languages like flutter, android, java,kotlin etc.with the help of this languages any user can develop the beautiful application

For more information about Flutter. visit