nisrulz / flutter-examples Goto Github PK
View Code? Open in Web Editor NEW[Examples] Simple basic isolated apps, for budding flutter devs.
Home Page: https://nisrulz.com/flutter-examples/
License: Apache License 2.0
[Examples] Simple basic isolated apps, for budding flutter devs.
Home Page: https://nisrulz.com/flutter-examples/
License: Apache License 2.0
floatingActionButton: new Theme(
// override the accent color of theme for this widget only
data: Theme.of(context).copyWith(accentColor: Colors.pinkAccent),
child: new FloatingActionButton(
onPressed: null,
child: new Icon(Icons.add),
),
),
This is not working. Floating color button is set to lightGreenAccent.
Hey Nishant,
I would like to contribute to this repo. I have created a mobile app that tracks Covid-19 cases. It uses the NovelCOVID API to fetch the results. I have also included some data visualizations in the app.
hey @nisrulz , Can I contribute to this repo with an app supporting firebase authentication with google and facebook signIn under Hacktoberfest?
Hey,
I would like to contribute to this repository a simple BMI calculator app. It takes height and weight and shows the BMI and gives a remark on your weight.
Hey Nishant,
I would like to contribute to this repository by adding a simple notes app which stores data locally on a Device using SQLite database
Can I make a PR on this?
Hey!!
I want to contribute to this repository. I would like to add a working calculator project made in flutter. Can I make a PR under hacktoberfest?
The following error is raised in case you tilt the phone -
I/FlutterActivityDelegate(13663): onResume setting current activity to this
I/flutter (13663): ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════
I/flutter (13663): The following message was thrown during layout:
I/flutter (13663): A RenderFlex overflowed by 15 pixels on the bottom.
I/flutter (13663):
I/flutter (13663): The overflowing RenderFlex has an orientation of Axis.vertical.
I/flutter (13663): The edge of the RenderFlex that is overflowing has been marked in the rendering with a yellow and
I/flutter (13663): black striped pattern. This is usually caused by the contents being too big for the RenderFlex.
I/flutter (13663): Consider applying a flex factor (e.g. using an Expanded widget) to force the children of the
I/flutter (13663): RenderFlex to fit within the available space instead of being sized to their natural size.
I/flutter (13663): This is considered an error condition because it indicates that there is content that cannot be
I/flutter (13663): seen. If the content is legitimately bigger than the available space, consider clipping it with a
I/flutter (13663): ClipRect widget before putting it in the flex, or using a scrollable container rather than a Flex,
I/flutter (13663): like a ListView.
I/flutter (13663): The specific RenderFlex in question is:
I/flutter (13663): RenderFlex#ff4a0 relayoutBoundary=up2 OVERFLOWING
I/flutter (13663): creator: Column ← Center ← Container ← MediaQuery ← LayoutId-[<_ScaffoldSlot.body>] ←
I/flutter (13663): CustomMultiChildLayout ← AnimatedBuilder ← DefaultTextStyle ← AnimatedDefaultTextStyle ←
I/flutter (13663): _InkFeatures-[GlobalKey#87c38 ink renderer] ← NotificationListener ←
I/flutter (13663): PhysicalModel ← ⋯
I/flutter (13663): parentData: offset=Offset(0.0, 0.0) (can use size)
I/flutter (13663): constraints: BoxConstraints(0.0<=w<=698.2, 0.0<=h<=316.7)
I/flutter (13663): size: Size(698.2, 316.7)
I/flutter (13663): direction: vertical
I/flutter (13663): mainAxisAlignment: start
I/flutter (13663): mainAxisSize: max
I/flutter (13663): crossAxisAlignment: stretch
I/flutter (13663): verticalDirection: down
I/flutter (13663): ◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤
I/flutter (13663): ════════════════════════════════════════════════════════════════════════════════════════════════════
enabling_splash_screen invalid
@nisrulz do you have tutorial or step by step how create these sample apps?
please kindly share if you have ones.
Hey Nishant,
I would like to contribute to this repo by adding an app which can show the latest news feed and memes to the users.
Can I make a PR on this under Hacktoberfest?
i need the parsed json data to display it on tabbar; can i use listview builder there
Hi,
Scaffold.of(context).showSnackBar deprecated.
Use
ScaffoldMessenger.of(context).showSnackBar()
https://docs.flutter.dev/release/breaking-changes/scaffold-messenger
Hey Nishant,
I would like to contribute to this repo. I have created a mobile app that shows different meals of different countries and suited for different moods and their pictures and how to cook them with proper ingredients and step by step recipes.
I have split the code into different files. I will document the code and also use understandable variable names as much as possible. I have also formatted the code in every file.
I am using the latest version of flutter 2.5.1.
Can I create a PR ?
Hey,
My name is Devesh Garg flutter developer, I have created more than 40 real-life projects and now want to contribute to this project I think there is no phone authentication with automatic OTP input. I can build it and make sure that it is proper user readable.
I also think multi-language support is also important so want to create its example too.
Thank you.
how to make the grids clickable?
I try to change to another layout when one of the items is clicked.
Hey Nishant,
I would like to contribute in this repo and work on this if its available.
Yesterday (monday april 29 2019), I cloned the repo and tried to build the "google_signin" project. Eventually I got it building and running, after an hour of retesting. I tested my changes only on a Pixel 2 connected device running Android P.
I can build a pull request, if you like. I plan to test the changes in a Nexus 5x emulator today.
The problem seemed to be related to the latest versions of firebase_auth and google_sign_in. I changed 6 files, although all changes may not be necessary for the fix.
Task Planning app.
Login, sign up with fire_base authentication.
Each and every user have their own tasks or plans to do.
In this after user logged in he can see his plans if already present, if not he can plan or create his tasks, and he can update, he can also delete his tasks or plans after he done with his each task.
Can you please assign this to me , I am interested to contribute myself in hacktoberfest _23 : )
Project Name: firebase_crash_reporting
Description: A flutter example app to setup firebase crash reporting service
I have an external database (localhost) that contains a "questions" table characterized by their level (Easy, Medium, Hard) and class(1st class, 2nd class, 3rd class).
I have an internal database that contains a "student" table with level and class attributes that contain in the external database.
I want to post only the questions that correspond to the level and class of the student that is already added in the internal database "SQFLite".
I posted all the questions in the JSON form but did not match the level and class of the student,
But I want when I add a new student with their level and class in the internal database, the questions that are displayed must be matched to that of the student.
model.dart: contains the student's model
class Student {
int _id;
String _name;
String _level;
String _classes ;
String _date;
Student(this._name, this._level, this._classes, this._date);
Student.withId(this._id, this._name, this._level, this._classes ,this._date);
String get date => _date;
String get level => _level;
String get classes => _classes;
String get name => _name;
int get id => _id;
set date(String value) {
_date = value;
}
set level(String value) {
_level = value;
}
set classes(String value) {
_classes = value;
}
set name(String value) {
if (value.length <= 255) {
_name = value;
}
}
Map<String, dynamic> toMap() {
var map = Map<String, dynamic>();
map["id"] = this._id;
map["name"] = this._name;
map["level"] = this._level;
map["classes"] = this._classes;
map["date"] = this._date;
return map;
}
Student.getMap(Map<String, dynamic> map){
this._id = map["id"];
this._name = map["name"];
this._level = map["level"];
this._classes= map["classes"];
this._date = map["date"];
}
}
sql_helper.dart: contains the internal database
import 'package:flutter/material.dart';
import 'package:sqflite/sqflite.dart';
import 'dart:async';
import 'dart:io';
import 'model.dart';
import 'package:path_provider/path_provider.dart';
class SQL_Helper {
static SQL_Helper dbHelper;
static Database _database;
SQL_Helper._createInstance();
factory SQL_Helper() {
if (dbHelper == null) {
dbHelper = SQL_Helper._createInstance();
}
return dbHelper;
}
String tableName = "students_table";
String _id = "id";
String __name = "name";
String __level= "level";
String __classes = "classes";
String __date = "date";
Future<Database> get database async {
if (_database == null){
_database = await initializedDatabase();
}
return _database;
}
Future<Database> initializedDatabase() async {
Directory directory = await getApplicationDocumentsDirectory();
String path = directory.path + "students.db";
var studentDB = await openDatabase(path, version: 1, onCreate: createDatabase);
return studentDB;
}
void createDatabase(Database db, int version) async {
await db.execute(
"CREATE TABLE $tableName($_id INTEGER PRIMARY KEY AUTOINCREMENT, $__name TEXT, $__level TEXT,$__classes TEXT, $__date TEXT )");
}
Future<List<Map<String, dynamic>>> getStudentMapList() async {
Database db = await this.database;
var result = await db.query(tableName, orderBy: "$_id ASC");
return result;
}
Future<int> insertStudent(Student student) async {
Database db = await this.database;
var result = await db.insert(tableName, student.toMap());
return result;
}
Future<int> updateStudent(Student student) async{
Database db = await this.database;
var result = await db.update(tableName, student.toMap(), where: "$_id = ?", whereArgs: [student.id]);
return result;
}
Future<int> deleteStudent(int id) async {
var db = await this.database;
int result = await db.rawDelete("DELETE FROM $tableName WHERE $_id = $id");
return result;
}
Future<int> getCount() async {
Database db = await this.database;
List<Map<String, dynamic>> all = await db.rawQuery("SELECT COUNT (*) FROM $tableName");
int result = Sqflite.firstIntValue(all);
return result;
}
Future<List<Student>> getStudentList() async{
var studentMapList = await getStudentMapList();
int count = studentMapList.length;
List<Student> students = new List<Student>();
for (int i = 0; i <= count -1; i++){
students.add(Student.getMap(studentMapList[i]));
}
return students;
}
}
main.dart
import 'package:flutter/material.dart';
import 'package:relationtables/sql_helper.dart';
import 'package:sqflite/sqflite.dart';
import 'package:http/http.dart' as http;
import 'package:intl/intl.dart';
import 'dart:convert';
import 'model.dart';
import 'dart:async';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
// TODO: implement build
return MaterialApp(
title: "Students List",
debugShowCheckedModeBanner: false,
theme: ThemeData(
primarySwatch: Colors.cyan
),
home: StudentsList(),
);
}
}
class StudentsList extends StatefulWidget{
@override
State<StatefulWidget> createState() {
// TODO: implement createState
return StudentsState();
}
}
class StudentsState extends State<StudentsList> {
SQL_Helper helper = new SQL_Helper();
List<Student> studentsList;
int count = 0;
@override
Widget build(BuildContext context) {
if (studentsList == null) {
studentsList = new List<Student>();
updateListView();
}
// TODO: implement build
return Scaffold(
appBar: AppBar(
title: Text("Students"),
),
body: getStudentsList(),
floatingActionButton: FloatingActionButton(
onPressed: () {
navigateToStudent(Student('','','', ''), "Add New Student");
},
tooltip: 'Add Student',
child: Icon(Icons.add),
)
);
}
ListView getStudentsList() {
return ListView.builder(
itemCount: count,
itemBuilder: (BuildContext context, int position) {
return Card(
color: Colors.white,
elevation: 2.0,
child: ListTile(
leading: Icon(Icons.person_pin),
title: Text(this.studentsList[position].name),
subtitle: Text(this.studentsList[position].level+ " | " + this.studentsList[position].classes+' '+this.studentsList[position].date),
trailing:
GestureDetector(
child: Icon(Icons.delete, color: Colors.grey,),
onTap: () {
_delete(context, this.studentsList[position]);
},
)
,
onTap: () {
Navigator.push(
context, MaterialPageRoute(builder: (context) {
return Menu();
}));
},
),
);
});
}
void _delete(BuildContext context, Student student) async {
int ressult = await helper.deleteStudent(student.id);
if (ressult != 0) {
_showSenckBar(context, "Student has been deleted");
updateListView();
}
}
void _showSenckBar(BuildContext context, String msg) {
final snackBar = SnackBar(content: Text(msg),);
Scaffold.of(context).showSnackBar(snackBar);
}
void updateListView() {
final Future<Database> db = helper.initializedDatabase();
db.then((database) {
Future<List<Student>> students = helper.getStudentList();
students.then((theList) {
setState(() {
this.studentsList = theList;
this.count = theList.length;
});
});
});
}
void navigateToStudent(Student student, String appTitle) async {
bool result = await Navigator.push(
context, MaterialPageRoute(builder: (context) {
return StudentDetail(student, appTitle);
}));
if (result) {
updateListView();
}
}
}
class StudentDetail extends StatefulWidget{
String screenTitle;
Student student;
StudentDetail(this.student , this.screenTitle);
@override
State<StatefulWidget> createState() {
// TODO: implement createState
return Students(this.student, screenTitle);
}
}
class Students extends State<StudentDetail> {
static var _level = ["Easy", "Medium","Hard"];
static var _classes =["1st class", "2nd class","3rd class"];
String screenTitle;
Student student;
SQL_Helper helper = new SQL_Helper();
Students(this.student ,this.screenTitle);
TextEditingController studentName = new TextEditingController();
@override
Widget build(BuildContext context) {
TextStyle textStyle = Theme
.of(context)
.textTheme
.title;
studentName.text = student.name;
// TODO: implement build
return
WillPopScope(
onWillPop: () {
debugPrint("WillPopScope Button");
goBack();
},
child: Scaffold(
appBar: AppBar(
title: Text(screenTitle),
leading: IconButton(
icon: Icon(Icons.arrow_back),
onPressed: () {
goBack();
},
),
),
body: Padding(
padding: EdgeInsets.only(top: 15.0, left: 10.0, right: 10.0),
child: ListView(
children: <Widget>[
Padding(
padding: EdgeInsets.only(top: 15.0, bottom: 15.0),
child: TextField(
controller: studentName,
style: textStyle,
onChanged: (value) {
student.name = value;
},
decoration: InputDecoration(
labelText: "Name :",
labelStyle: textStyle,
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(5.0),
)
),
),
),
Row(
children: <Widget>[
SizedBox(width: 3),
Expanded(
child: DropdownButton(
isDense: true,
hint: Text('Level'),
isExpanded: true,
iconSize: 20,
items: _level.map((String dropDownStringItem) {
return DropdownMenuItem(
value: dropDownStringItem,
child: Text(dropDownStringItem),
);
}).toList(),
value: student.level == '' ? null : student.level,
onChanged: (String value) {
updateLevel(value);
},
),
),
SizedBox(width: 3),
Expanded(
child: DropdownButton(
isDense: true,
hint: Text('Class'),
isExpanded: true,
iconSize: 20,
items: _classes.map((String dropDownStringItem) {
return DropdownMenuItem(
value: dropDownStringItem,
child: Text(dropDownStringItem),
);
}).toList(),
value: student.classes == '' ? null : student.classes,
onChanged: (String value) {
updateClass(value);
},
),
),
],
),
Padding(
padding: EdgeInsets.only(top: 15.0, bottom: 15.0),
child: Row(
children: <Widget>[
Expanded(
child: RaisedButton(
color: Theme
.of(context)
.primaryColorDark,
textColor: Theme
.of(context)
.primaryColorLight,
child: Text(
'SAVE', textScaleFactor: 1.5,
),
onPressed: () {
setState(() {
debugPrint("User Click SAVED");
_save();
});
},
),
),
Container(width: 5.0,),
Expanded(
child: RaisedButton(
color: Theme
.of(context)
.primaryColorDark,
textColor: Theme
.of(context)
.primaryColorLight,
child:
Text(
'Delete', textScaleFactor: 1.5,
),
onPressed: () {
setState(() {
debugPrint("User Click Delete");
_delete();
});
},
),
),
],
),
)
],
),
),
)
);
}
void goBack() {
Navigator.pop(context, true);
}
void updateLevel(String value) {
setState(() {
student.level = value;
});
}
void updateClass(String value) {
setState(() {
student.classes = value;
});
}
void _save() async {
goBack();
student.date = DateFormat.yMMMd().format(DateTime.now());
int result;
if (student.id == null) {
result = await helper.insertStudent(student);
} else {
result = await helper.updateStudent(student);
}
if (result == 0) {
showAlertDialog('Sorry', "Student not saved");
} else {
showAlertDialog('Congratulations', 'Student has been saved successfully');
}
}
void showAlertDialog(String title, String msg){
AlertDialog alertDialog = AlertDialog(
title: Text(title),
content: Text(msg),
);
showDialog(context: context, builder: (_) => alertDialog);
}
void _delete() async {
goBack();
if (student.id == null){
showAlertDialog('Ok Delete', "No student was deleted");
return;
}
int result = await helper.deleteStudent(student.id);
if (result == 0) {
showAlertDialog('Ok Delete', "No student was deleted");
} else {
showAlertDialog('Ok Delete', "Student has been deleted");
}
}
}
class Menu extends StatefulWidget {
@override
_MenuState createState() => _MenuState();
}
class _MenuState extends State<Menu> {
@override
Widget build(BuildContext context) {
return Container(
color: Colors.tealAccent,
padding: EdgeInsets.only(top:150),
child: Center(
child: GridView.count(
crossAxisCount: 1,
padding: EdgeInsets.all(50),
children: <Widget>[
Card(
margin: EdgeInsets.all(70.0),
child: InkWell(
onTap: (){
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => Questions()
),
);
},
splashColor: Colors.deepPurple,
child: Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Icon(Icons.library_books, size:70.0, color:Colors.blue,),
Text("Questions List",style: new TextStyle(fontSize: 20.0,color: Colors.black , fontWeight: FontWeight.bold))
],
),
),
)
),
]
),
)
);
}
}
class Questions extends StatefulWidget {
@override
_QuestionsState createState() => _QuestionsState();
}
class _QuestionsState extends State<Questions> {
getMethod()async{
String theUrl = 'http://10.0.2.2/Try/Try.php';
var res = await http.get(Uri.encodeFull(theUrl),headers:{"Accept":"application/json"});
var responsBody = json.decode(res.body);
print(responsBody);
return responsBody;
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: new AppBar(
title:Text("Questions", style: TextStyle(fontWeight: FontWeight.bold),) ,
backgroundColor: Colors.blue[700],
),
backgroundColor: Colors.blue[99],
body:FutureBuilder(
future: getMethod(),
builder: (BuildContext context , AsyncSnapshot snapshot){
List snap = snapshot.data;
if(snapshot.connectionState == ConnectionState.waiting){
return Center(
child: CircularProgressIndicator(),
);
}
if(snapshot.hasError){
return Center(
child: Text("Error .... "),
);
}
return ListView.separated(
separatorBuilder: (context, index) => Divider(
color: Colors.indigo,
),
itemCount: snap.length,
itemBuilder: (context,index){
return ListTile(
title: Text(
"${snap[index]['description']}", style: TextStyle(fontSize: 18.0)),
leading:Icon(Icons.question_answer, color:Colors.green , size: 20, ) ,
);
},
);
},
),
);
}
}
Project Name: twitter_signin
Description: A flutter example app to Twitter Signin
Example using_tabs, line 33 of main.dart length should be 3 instead of 2
controller = new TabController(length: 3, vsync: this);
https://github.com/nisrulz/flutter-examples/blob/master/using_http_get/lib/main.dart
The URL (https://swapi.co/api/people) doesn't seem to be normal.
This "issue" serves as a guest book. You're welcome to write nice things about this project, share how it's helped you out, learn something or solve a problem.
Idea came from this tweet.
Project Name: analytics_integration
Description: A flutter example app to setup analytics such as Google Analytics.
Friday_virtual_assistant,
User can speak and write his prompts same as that of chatgpt but here voice assistant is there to speek and listen to your questions and answer them all by providing the accurate content.
In this app, You can also get Images of your own imagination and you can also download them.
For example---
Astronaut riding a horse
This app is built using Flutter and OPENAI API.
Can you assign this to me, I am interested to contribute myself in hacktoberfest_23 : )
is that (sanpshot.data) tha data is List type data variable ?
its not woeing as list data ..
Hi
I have coded the UI in flutter which look like this . Can any one help me to make horizontal scroll for card which is down in screen
import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: 'Flutter Demo',
theme: new ThemeData(
// This is the theme of your application.
//
// Try running your application with "flutter run". You'll see the
// application has a blue toolbar. Then, without quitting the app, try
// changing the primarySwatch below to Colors.green and then invoke
// "hot reload" (press "r" in the console where you ran "flutter run",
// or press Run > Flutter Hot Reload in IntelliJ). Notice that the
// counter didn't reset back to zero; the application is not restarted.
primarySwatch: Colors.blue,
),
home: new MyHomePage());
}
}
class MyHomePage extends StatelessWidget {
static const IconData list =
IconData(0xe8b6, fontFamily: 'MaterialIcons', matchTextDirection: true);
static const IconData dwon =
IconData(0xe5c5, fontFamily: 'MaterialIcons', matchTextDirection: true);
@override
Widget build(BuildContext context) {
return new Scaffold(
body: ListView(
padding: new EdgeInsets.all(0.0),
children: <Widget>[
Column(
children: <Widget>[
new Container(
child: new ClipPath(
child: new Container(
alignment: Alignment.topLeft,
padding: new EdgeInsets.only(top: 30.0),
decoration: new BoxDecoration(
gradient: new LinearGradient(
begin: Alignment.bottomLeft,
end: Alignment.topRight,
colors: [
const Color(0XFF173CF6),
const Color(0XFF1765F6),
const Color(0XFF1B90F9),
const Color(0XFF9CECFB)
])),
height: 280.0,
child: new Container(
padding: new EdgeInsets.all(30.0),
child: new Column(
children: <Widget>[
new Row(
children: <Widget>[
new Container(
height: 90.0,
width: 90.0,
decoration: new BoxDecoration(
boxShadow: [
new BoxShadow(
color: Colors.black54,
offset: new Offset(0.0, 2.0),
blurRadius: 12.0,
spreadRadius: 1.0)
],
image: new DecorationImage(
image:
AssetImage('assets/images/1.jpg')),
borderRadius:
new BorderRadius.circular(50.0),
color: Color(0xFF6190E8)),
),
Expanded(
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
new Icon(
list,
color: Colors.white,
size: 30.0,
),
],
))
],
),
new Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Padding(
padding: const EdgeInsets.all(8.0),
child: new Text(
'Hasnen Tai',
style: new TextStyle(
color: Colors.white,
fontSize: 20.0,
fontWeight: FontWeight.w700),
),
),
Padding(
padding: const EdgeInsets.symmetric(
vertical: 0.0, horizontal: 8.0),
child: new Text(
'Initializing hot reload Reloaded 1 of 391 libraries in 15,285ms.',
style: new TextStyle(
color: Colors.white,
fontSize: 15.0,
),
),
)
],
)
],
)),
),
clipper: new BottomWaveClipper(),
),
),
Padding(
padding: const EdgeInsets.only(
left: 38.0,
top: 30.0,
),
child: Row(
children: <Widget>[
new Text(
"Barber",
style: new TextStyle(
fontSize: 20.0,
fontWeight: FontWeight.w600,
color: Colors.black87),
),
new Icon(
dwon,
color: Colors.black87,
)
],
),
),
new ListView(
shrinkWrap: true,
scrollDirection: Axis.vertical,
children: <Widget>[
new Row(
children: <Widget>[
new Container(
margin: EdgeInsets.all(30.0),
width: 400.0,
height: 400.0,
decoration: new BoxDecoration(
boxShadow: [
new BoxShadow(
color: Colors.black26,
offset: new Offset(0.0, 2.0),
blurRadius: 19.0,
spreadRadius: 0.4)
],
borderRadius: new BorderRadius.circular(20.0),
gradient: new LinearGradient(
begin: Alignment.bottomLeft,
end: Alignment.topRight,
colors: [
const Color(0XFF173CF6),
const Color(0XFF1765F6),
const Color(0XFF1B90F9),
const Color(0XFF9CECFB)
])),
child: new Column(
children: <Widget>[
new Row(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
Padding(
padding: const EdgeInsets.only(
top: 28.0, right: 20.0),
child: new Container(
alignment: Alignment.center,
margin: new EdgeInsets.only(top: 10.0),
height: 40.0,
width: 80.0,
child: new Text(
"Open",
style: new TextStyle(
fontWeight: FontWeight.w600,
color: Colors.white70),
),
decoration: new BoxDecoration(
borderRadius:
new BorderRadius.circular(50.0),
border: new Border.all(
width: 1.3,
color: Colors.greenAccent)),
),
),
],
),
new Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
new Container(
height: 110.0,
width: 110.0,
decoration: new BoxDecoration(
image: new DecorationImage(
image:
AssetImage('assets/images/1.jpg')),
borderRadius:
new BorderRadius.circular(150.0),
color: Color(0xFF6190E8)),
),
],
),
new Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Padding(
padding: const EdgeInsets.all(18.0),
child: new Text(
"Bloat Barber",
style: new TextStyle(
fontSize: 24.0,
fontWeight: FontWeight.w800,
color: Colors.white70),
),
)
],
),
new Row(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
Flexible(
child: Container(
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: 20.0),
child: new Text(
"#233,Anjanandri,2nd Floor,3rd Main Road,AGB Layout,Bangalore",
style: new TextStyle(color: Colors.white70),
textAlign: TextAlign.center,
),
))),
],
)
],
),
)
],
)
],
)
],
),
],
));
}
}
class BottomWaveClipper extends CustomClipper<Path> {
@override
Path getClip(Size size) {
var path = new Path();
path.lineTo(0.0, size.height);
path.lineTo(size.width, size.height - 40);
path.lineTo(size.width, 0.0);
return path;
}
@override
bool shouldReclip(CustomClipper<Path> oldClipper) => false;
}
The gradle.properties file is missing
Project Name: using_firebase_db
Description: A flutter example app to setup firebase realtime database integration.
Project Name: view_pdf_file
Description: A flutter example app to view pdf files.
Supporting Info:
Project Name: static_code_analysis
Description: A flutter example app to setup static code analysis plugins such as CheckStyle, Sonar, Findbugs, etc
Launching lib/main.dart on iPhone Xʀ in debug mode...
Running Xcode build...
Xcode build done. 9.2s
Syncing files to device iPhone Xʀ...
════════ Exception caught by image resource service ════════════════════════════════════════════════
The following SocketException was thrown resolving an image codec:
OS Error: Operation timed out, errno = 60, address = raw.githubusercontent.com, port = 54151
When the exception was thrown, this was the stack:
#0 NetworkImage._loadAsync (package:flutter/src/painting/_network_image_io.dart:88:43)
#1 NetworkImage.load (package:flutter/src/painting/_network_image_io.dart:48:14)
#2 ImageProvider.resolve... (package:flutter/src/painting/image_provider.dart:316:48)
#3 ImageCache.putIfAbsent (package:flutter/src/painting/image_cache.dart:160:22)
...
Image provider: NetworkImage("https://github.com/nisrulz/flutter-examples/raw/develop/image_from_network/img/flutter_logo.png", scale: 1.0)
Image key: NetworkImage("https://github.com/nisrulz/flutter-examples/raw/develop/image_from_network/img/flutter_logo.png", scale: 1.0)
════════════════════════════════════════════════════════════════════════════════════════════════════
════════ (2) Exception caught by image resource service ════════════════════════════════════════════
OS Error: Operation timed out, errno = 60, address = raw.githubusercontent.com, port = 54152
════════════════════════════════════════════════════════════════════════════════════════════════════
Project Name: push_notifications
Description: A flutter example app to setup firebase push notifications
👍 I propose enhancing the API integration app documentation to for those who are unfamiliar with API calls.
Suggested improvements include detailed explanations,
practical examples, endpoint details (Users, Albums, Photos, etc.),
HTTP methods (GET, POST), API endpoint
I will ensure the documentation is user-friendly and accessible to all levels of users.
Thank you
Hello sir, I am going to add an example of InteractiveViewer and please accept my pull request
Can u give any source code to view PDF in flutter
Failed to notify ProjectEvaluationListener.afterEvaluate(), but primary configuration failure takes precedence.
java.lang.IllegalStateException: buildToolsVersion is not specified.
at com.google.common.base.Preconditions.checkState(Preconditions.java:173)
at com.android.build.gradle.BasePlugin.createAndroidTasks(BasePlugin.java:558)
at com.android.build.gradle.BasePlugin.lambda$null$4(BasePlugin.java:526)
at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:81)
at com.android.build.gradle.BasePlugin.lambda$createTasks$5(BasePlugin.java:522)
at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.java:93)
at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.java:82)
at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:44)
at org.gradle.internal.event.BroadcastDispatch.dispatch(BroadcastDispatch.java:79)
at org.gradle.internal.event.BroadcastDispatch.dispatch(BroadcastDispatch.java:30)
at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
at com.sun.proxy.$Proxy16.afterEvaluate(Unknown Source)
at org.gradle.configuration.project.LifecycleProjectEvaluator.notifyAfterEvaluate(LifecycleProjectEvaluator.java:82)
at org.gradle.configuration.project.LifecycleProjectEvaluator.doConfigure(LifecycleProjectEvaluator.java:76)
at org.gradle.configuration.project.LifecycleProjectEvaluator.access$000(LifecycleProjectEvaluator.java:33)
at org.gradle.configuration.project.LifecycleProjectEvaluator$1.execute(LifecycleProjectEvaluator.java:53)
at org.gradle.configuration.project.LifecycleProjectEvaluator$1.execute(LifecycleProjectEvaluator.java:50)
at org.gradle.internal.Transformers$4.transform(Transformers.java:169)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:61)
at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:50)
at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:628)
at org.gradle.api.internal.project.DefaultProject.evaluationDependsOn(DefaultProject.java:699)
at org.gradle.api.internal.project.DefaultProject.evaluationDependsOn(DefaultProject.java:691)
at org.gradle.api.Project$evaluationDependsOn.call(Unknown Source)
at build_anlrty7ysz8l8nc1pf0y1wu6x$_run_closure2.doCall(/Users/jinyulei/Desktop/flutter-examples/stateless_widgets/android/build.gradle:26)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1024)
at groovy.lang.Closure.call(Closure.java:414)
at groovy.lang.Closure.call(Closure.java:430)
at org.gradle.api.internal.ClosureBackedAction.execute(ClosureBackedAction.java:70)
at org.gradle.util.ConfigureUtil.configureTarget(ConfigureUtil.java:160)
at org.gradle.util.ConfigureUtil.configure(ConfigureUtil.java:106)
at org.gradle.api.internal.project.DefaultProject.configure(DefaultProject.java:983)
at org.gradle.api.internal.project.DefaultProject.configure(DefaultProject.java:988)
at org.gradle.api.internal.project.DefaultProject.subprojects(DefaultProject.java:971)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at org.gradle.internal.metaobject.BeanDynamicObject$MetaClassAdapter.invokeMethod(BeanDynamicObject.java:382)
at org.gradle.internal.metaobject.BeanDynamicObject.invokeMethod(BeanDynamicObject.java:170)
at org.gradle.internal.metaobject.CompositeDynamicObject.invokeMethod(CompositeDynamicObject.java:96)
at org.gradle.internal.metaobject.MixInClosurePropertiesAsMethodsDynamicObject.invokeMethod(MixInClosurePropertiesAsMethodsDynamicObject.java:30)
at org.gradle.internal.metaobject.AbstractDynamicObject.invokeMethod(AbstractDynamicObject.java:163)
at org.gradle.groovy.scripts.BasicScript.methodMissing(BasicScript.java:83)
at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaClassImpl.invokeMissingMethod(MetaClassImpl.java:941)
at groovy.lang.MetaClassImpl.invokePropertyOrMissing(MetaClassImpl.java:1264)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1217)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1024)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:69)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:166)
at build_anlrty7ysz8l8nc1pf0y1wu6x.run(/Users/jinyulei/Desktop/flutter-examples/stateless_widgets/android/build.gradle:24)
at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:90)
at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl$2.run(DefaultScriptPluginFactory.java:176)
at org.gradle.configuration.ProjectScriptTarget.addConfiguration(ProjectScriptTarget.java:77)
at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:181)
at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:39)
at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:26)
at org.gradle.configuration.project.ConfigureActionsProjectEvaluator.evaluate(ConfigureActionsProjectEvaluator.java:34)
at org.gradle.configuration.project.LifecycleProjectEvaluator.doConfigure(LifecycleProjectEvaluator.java:70)
at org.gradle.configuration.project.LifecycleProjectEvaluator.access$000(LifecycleProjectEvaluator.java:33)
at org.gradle.configuration.project.LifecycleProjectEvaluator$1.execute(LifecycleProjectEvaluator.java:53)
at org.gradle.configuration.project.LifecycleProjectEvaluator$1.execute(LifecycleProjectEvaluator.java:50)
at org.gradle.internal.Transformers$4.transform(Transformers.java:169)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:61)
at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:50)
at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:628)
at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:129)
at org.gradle.execution.TaskPathProjectEvaluator.configure(TaskPathProjectEvaluator.java:35)
at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(TaskPathProjectEvaluator.java:60)
at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:38)
at org.gradle.initialization.DefaultGradleLauncher$1.execute(DefaultGradleLauncher.java:161)
at org.gradle.initialization.DefaultGradleLauncher$1.execute(DefaultGradleLauncher.java:158)
at org.gradle.internal.Transformers$4.transform(Transformers.java:169)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:56)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:158)
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:119)
at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:102)
at org.gradle.launcher.exec.GradleBuildController.run(GradleBuildController.java:71)
at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:41)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:75)
at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:49)
at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:44)
at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:29)
at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:67)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:47)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72)
at org.gradle.util.Swapper.swap(Swapper.java:38)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:60)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:72)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50)
at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:297)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
FAILURE: Build failed with an exception.
Greetings,
Thank you for the amazing collection of Flutter code. I visited some of the links mentioned in the Readme.md file. However, when I clicked on the link push_notifications, it displayed a 404 error.
Project Name: ci_integration
Description: A flutter example app to setup CI integration such as Bitrise.
The app is supposed to work like:
dist
.hi, can I pls contribute to your tip app calculator?
I had the idea of adding the feature to see the total tips received by the user in a day.
i'm on hacktoberfest.
regards
@nisrulz can I contribute my quiz App in this repository
Because the codes are old this example has many errors and when beginners try to run this one they'll probably face these errors. So I'll open this issue and make a PR to fix them.
Edit: the errors were because of my local things, example is working.
Project Name: unit_testing
Description: A flutter example app to demonstrate unit testing.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.