Setting up the app

Alright so let's begin assuming you created the project and can currently run the hello world app, first thing to do is remove all the boilerplate and keep only the main method.

void main() async {
  runApp(Application());
}

After this, you need to create the "Application" widget. In order to do that create a new folder under src and create a new file called "application.dart"

import 'package:flutter/material.dart';

class Application extends StatelessWidget {
  const Application({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        title: 'Tech camp Flutter',
        debugShowCheckedModeBanner: false,
        home: Scaffold()
    );
  }
}

So all of this is straightforward. The next step is to define our routes.

Last updated