forked from Purus/launch_review
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request Purus#2 from MaskyS/patch-1
You won't believe how this teenage developer improved this code in 30 seconds
- Loading branch information
Showing
1 changed file
with
16 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,30 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:launch_review/launch_review.dart'; | ||
|
||
void main() => runApp(new MyApp()); | ||
void main() => runApp(MyApp()); | ||
|
||
class MyApp extends StatefulWidget { | ||
@override | ||
_MyAppState createState() => new _MyAppState(); | ||
_MyAppState createState() => _MyAppState(); | ||
} | ||
|
||
class _MyAppState extends State<MyApp> { | ||
@override | ||
initState() { | ||
super.initState(); | ||
} | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return new MaterialApp( | ||
home: new Scaffold( | ||
appBar: new AppBar(title: new Text('Launch App Review')), | ||
body: new Center( | ||
child: new RaisedButton( | ||
child: new Text("Rate App"), | ||
onPressed: () { | ||
LaunchReview.launch( | ||
androidAppId: "com.iyaffle.rangoli", | ||
iOSAppId: "585027354"); | ||
})))); | ||
return MaterialApp( | ||
home: Scaffold( | ||
appBar: AppBar(title: Text('Launch App Review')), | ||
body: Center( | ||
child: RaisedButton( | ||
child: Text("Rate App"), | ||
onPressed: () => LaunchReview.launch( | ||
androidAppId: "com.iyaffle.rangoli", | ||
iOSAppId: "585027354", | ||
), | ||
), | ||
), | ||
), | ||
); | ||
} | ||
} |