Skip to content

Commit

Permalink
Step 4 - log button click
Browse files Browse the repository at this point in the history
  • Loading branch information
CrossBread committed Oct 3, 2020
1 parent 575b77e commit 2ed4571
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 1 deletion.
15 changes: 15 additions & 0 deletions ios/Flutter/flutter_export_environment.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh
# This is a generated file; do not edit or check into version control.
export "FLUTTER_ROOT=C:\tools\flutter"
export "FLUTTER_APPLICATION_PATH=D:\git\complete-flutter-dev-bootcamp\magic-8-ball-flutter"
export "FLUTTER_TARGET=lib\main.dart"
export "FLUTTER_BUILD_DIR=build"
export "SYMROOT=${SOURCE_ROOT}/../build\ios"
export "OTHER_LDFLAGS=$(inherited) -framework Flutter"
export "FLUTTER_FRAMEWORK_DIR=C:\tools\flutter\bin\cache\artifacts\engine\ios"
export "FLUTTER_BUILD_NAME=1.0.0"
export "FLUTTER_BUILD_NUMBER=1"
export "DART_OBFUSCATION=false"
export "TRACK_WIDGET_CREATION=false"
export "TREE_SHAKE_ICONS=false"
export "PACKAGE_CONFIG=.packages"
37 changes: 36 additions & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,41 @@ import 'package:flutter/material.dart';

void main() => runApp(
MaterialApp(
home: null,
home: BallPage(),
),
);

class BallPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Colors.blue.shade900,
title: Text('Ask Me Anything'),
),
body: Ball(),
backgroundColor: Colors.blue,
);
}
}

class Ball extends StatefulWidget {
@override
_BallState createState() => _BallState();
}

class _BallState extends State<Ball> {
@override
Widget build(BuildContext context) {
return Container(
child: Center(
child: FlatButton(
child: Image.asset('images/ball1.png'),
onPressed: () {
print('I got clicked');
},
),
),
);
}
}

0 comments on commit 2ed4571

Please sign in to comment.