Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import "github.com/flutter/flutter"
- import . "scaffold" // scaffold.go
- func (m *MyHomePage) Build(ctx flutter.BuildContext) flutter.Widget {
- return Scaffold{
- AppBar: AppBar{
- Title: Text{ Text: "My Home Page"},
- },
- Body: Center{
- Child: Column{
- MainAxisAlignment: MainAxisAlignment.center,
- Children: []Widget{
- Text{ Text: "You have pushed the button this many times:" },
- Text(
- Text: fmt.Sprintf("%d", m.counter),
- Style: ctx.textTheme.display1,
- },
- }
- }
- },
- FloatingActionButton: FloatingActionButton{
- onPressed: m.incrementCounter,
- Tooltip: "Increment",
- Child: Icon{Icons.add}, // Couldn't resist just one shorthand :)
- }
- }.Construct()
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement