get flutter code example

Example 1: how to install flutter

Just follow this link : https://flutter.dev/docs/get-started/install
And follow each and every step

Example 2: install flutter

C:\src>git clone https://github.com/flutter/flutter.git -b stable

Example 3: install flutter

$ sudo snap install flutter --classic

Example 4: flutter sdk

$ export PATH="$PATH:`pwd`/flutter/bin"

Example 5: get package flutter

class Home extends StatelessWidget {
  final controller = Get.put(Controller());
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text("counter")),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            GetBuilder<Controller>(
                builder: (_) => Text(
                      'clicks: ${controller.count}',
                    )),
            RaisedButton(
              child: Text('Next Route'),
              onPressed: () {
                Get.to(Second());
              },
            ),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
          child: Icon(Icons.add),
          onPressed: controller.increment(),  
          ),
    );
  }
}
class Second extends StatelessWidget {
  final Controller ctrl = Get.find();
  @override
  Widget build(context){
     return Scaffold(body: Center(child: Text("${ctrl.count}")));
  }
}