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
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( |
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
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( |
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
import 'package:flutter/material.dart'; | |
import 'package:image_picker/image_picker.dart'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { |
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
import 'package:flutter/material.dart'; | |
import 'package:flutter/services.dart'; | |
void main() { | |
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle( | |
statusBarColor: Colors.white, | |
)); | |
runApp(MyApp()); | |
} |
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
/* | |
Many a times we receive timestamp from an api which is in this format -> 2020-04-08T12:20:40.000Z. We ofcourse can't use | |
this date as is in the UI. Hence, we first need to convert it into a readable or specific format. | |
*/ | |
// Notice the `T` in the given date. It acts as a separator between `date` and `time` and doesn't hold any significance. Hence we will separate the given date using `substring()` method as below: | |
var str = "2020-04-08T12:20:40.000Z"; | |
var newStr = str.substring(0,10) + ' ' + str.substring(11,23); | |
print(newStr); // 2020-04-08 12:20:40.000 |
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
Right-click on features folder and select New -> Edit File Templates that will open File and Code Templates Dialog. | |
Click on `+' icon and write down “Cucumber feature file” in the name field and “feature” in the extensions field. | |
Press Apply and OK buttons to confirm the new item creation. | |
Right-click on features folder again select New and you will see Cucumber Feature file template. Select this option and name the file as login. | |
Observe that login.feature file is now created under features folder. |
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
class ProCategories extends StatefulWidget { | |
final FirebaseUser fireBaseuser; | |
ProCategories(this.fireBaseuser, this.categories); | |
final List<Categories> categories; | |
@override | |
_ProCategoriesState createState() => new _ProCategoriesState(fireBaseuser); |
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
[{ | |
"Rating": 4, | |
"Review": "He connected with me immediately on a Saturday and quickly diagnosed and helped me fix my burst water pipe. He's very prompt, professional, and nice. I highly recommend. 4 stars.", | |
"Created": "2016-11-22 21:13:23", | |
"FullName": "Michael Carey", | |
"City": "Spring Lake", | |
"State": "WI", | |
"profile_pic": "https:\/\/randomuser.me\/api\/portraits\/men\/64.jpg" | |
}, { | |
"Rating": 3, |
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
Widget _getReviewTile(Review review) { | |
// Keep only the day, month, and year | |
var date = review.created.split(" ")[0]; | |
return new Container( | |
child: new Row( | |
children: <Widget>[ | |
new Column( | |
children: <Widget>[ | |
new Text('${review.fullName}', | |
style: TextStyle(color: Colors.black)), |
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
class Review { | |
final int rating; | |
final String review; | |
final String created; | |
final String fullName; | |
final String city; | |
final String state; | |
final String profilePicURL; |
NewerOlder