Skip to content

Instantly share code, notes, and snippets.

@tirth-aubergine
Created December 10, 2019 06:11
Show Gist options
  • Save tirth-aubergine/628fc7c2b5852983e2d5d3055a323e90 to your computer and use it in GitHub Desktop.
Save tirth-aubergine/628fc7c2b5852983e2d5d3055a323e90 to your computer and use it in GitHub Desktop.
Flutter Internals
import 'package:flutter/foundation.dart';
void main() {
runApp(
MaterialApp(
title: 'Flutter Internals',
debugShowCheckedModeBanner: true,
home: Scaffold(
appBar: AppBar(
actions: [
IconButton(
onPressed: () {
// some action
},
icon: Icon(),
),
IconButton(
onPressed: () {
// some action
},
icon: Icon(),
),
],
title: Text('Flutter Internals'),
centerTitle: true,
),
body: ListView(
children: [
Container(
child: Text('Hello'),
),
Container(
child: Text('World'),
width: 100,
height: 70,
),
],
),
),
),
);
}
void runApp(Object appRoot) {
print('Running app');
}
class MaterialApp {
String title;
bool debugShowCheckedModeBanner;
String initialRoute;
Object home;
MaterialApp({
this.title,
this.debugShowCheckedModeBanner,
this.initialRoute,
this.home,
});
}
class Scaffold {
Object appBar;
Object body;
Object drawer;
Object bottomNavigationBar;
Scaffold({
this.appBar,
this.body,
this.drawer,
this.bottomNavigationBar,
});
}
class AppBar {
List<Object> actions;
Object title;
bool centerTitle;
AppBar({
this.actions,
this.title,
this.centerTitle,
});
}
class Text {
@required
String text;
Text(this.text);
}
class Container {
Object child;
double height;
double width;
Container({
this.child,
this.width,
this.height,
});
}
class IconButton {
@required
Object icon;
@required
Function onPressed;
IconButton({
this.icon,
this.onPressed,
});
}
class Icon {}
class ListView {
List<Object> children;
ListView({
this.children,
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment