import
'package:flutter/material.dart'
;
import
'package:favorite_button/favorite_button.dart'
;
void
main() {
runApp(
MaterialApp(
home: Scaffold(
appBar: AppBar(
title: Text(
'GeeksforGeeks'
),
backgroundColor: Colors.greenAccent[400],
centerTitle:
true
,
),
body: SingleChildScrollView(
padding: EdgeInsets.only(left: 0, right: 0, top: 20, bottom: 20),
child: Center(
child: Column(
children: [
Card(
elevation: 50,
shadowColor: Colors.black,
color: Colors.greenAccent[100],
child: SizedBox(
width: 310,
height: 510,
child: Padding(
padding:
const
EdgeInsets.all(20.0),
child: Column(
children: [
CircleAvatar(
backgroundColor: Colors.green[500],
radius: 108,
child: CircleAvatar(
backgroundImage: NetworkImage(
radius: 100,
),
),
SizedBox(
height: 10,
),
Text(
'GeeksforGeeks'
,
style: TextStyle(
fontSize: 30,
color: Colors.green[900],
fontWeight: FontWeight.w500,
),
),
SizedBox(
height: 10,
),
Text(
'GeeksforGeeks is a computer science portalfor geeks
at geeksforgeeks.org. It contains well written,
well thought and well explained computer science
and programming articles, quizzes, projects,
interview experiences and much more!!',
style: TextStyle(
fontSize: 15,
color: Colors.green[900],
),
),
SizedBox(
height: 10,
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SizedBox(
width: 100,
child: RaisedButton(
onPressed: () => null,
color: Colors.green,
child: Padding(
padding:
const
EdgeInsets.all(4.0),
child: Row(
children: [
Icon(Icons.touch_app),
Text(
'Visit'
),
],
),
),
),
),
FavoriteButton(
isFavorite:
false
,
valueChanged: (_isFavorite) {
print(
'Is Favorite : $_isFavorite'
);
},
),
],
),
],
),
),
),
),
SizedBox(
height: 20,
),
Card(
elevation: 50,
shadowColor: Colors.black,
color: Colors.yellowAccent[100],
child: SizedBox(
width: 310,
height: 510,
child: Padding(
padding:
const
EdgeInsets.all(20.0),
child: Column(
children: [
CircleAvatar(
backgroundColor: Colors.yellow[700],
radius: 108,
child: CircleAvatar(
backgroundImage: NetworkImage(
radius: 100,
),
),
SizedBox(
height: 10,
),
Text(
'GeeksforGeeks'
,
style: TextStyle(
fontSize: 30,
color: Colors.yellow[900],
fontWeight: FontWeight.w500,
),
),
SizedBox(
height: 10,
),
Text(
'GeeksforGeeks is a computer science portalfor geeks
at geeksforgeeks.org. It contains well written,
well thought and well explained computer science
and programming articles, quizzes, projects,
interview experiences and much more!!',
style: TextStyle(
fontSize: 15,
color: Colors.yellow[900],
),
),
SizedBox(
height: 10,
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SizedBox(
width: 100,
child: RaisedButton(
onPressed: () => null,
color: Colors.yellow[600],
child: Padding(
padding:
const
EdgeInsets.all(4.0),
child: Row(
children: [
Icon(Icons.touch_app),
Text(
'Visit'
),
],
),
),
),
),
FavoriteButton(
isFavorite:
true
,
valueChanged: (_isFavorite) {
print(
'Is Favorite : $_isFavorite'
);
},
),
],
),
],
),
),
),
),
],
),
),
),
),
)
);
}