Skip to content

Instantly share code, notes, and snippets.

@Vetjurv4
Created December 12, 2020 13:15
Show Gist options
  • Save Vetjurv4/c5b28dd29ea7f529c0967dab6fb1540a to your computer and use it in GitHub Desktop.
Save Vetjurv4/c5b28dd29ea7f529c0967dab6fb1540a to your computer and use it in GitHub Desktop.
Show detail country info
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'ListViews',
theme: ThemeData(
primarySwatch: Colors.teal,
), //theme data
home: Scaffold(
appBar: AppBar(title: Text('ListViews')), //app bar
body:
SingleChildScrollView(
child: Column(
children: [
Container(
margin: EdgeInsets.all(15.0),
child: Container(
padding: EdgeInsets.all(14.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
child: ListTile(
leading: CircleAvatar(
backgroundImage: NetworkImage(
'https://upload.wikimedia.org/wikipedia/en/a/ae/Flag_of_the_United_Kingdom.svg'),
),
title: Text('South Africa'),
subtitle: Text('something'),
),
), //Row
SizedBox(height: 10.0),
Image.network(
'https://upload.wikimedia.org/wikipedia/en/a/ae/Flag_of_the_United_Kingdom.svg',
fit: BoxFit.cover),
SizedBox(height: 10.0),
Text(
"South Africa covers an area of 1221037 km² "
"and has a population of 55653654 - the nation has a Gini coefficient of 63.1. "
"A resident of South Africa is called a South African. The main currency accepted as "
"legal tender is the South African rand which is expressed with the symbol",
),
Divider(),
], //children for the post flag details
),
), //container
), //card
Column(
//
children: <Widget>[
ListTile(
leading: Icon(Icons.location_on),
title: Text('South Africa'),
subtitle: Text('something'),
),
ListTile(
leading: Icon(Icons.location_city),
title: Text('South Africa'),
subtitle: Text('something'),
),
]),
Container(
color: Colors.green,
child: Row(children: <Widget>[
Icon(Icons.location_city),
Text('Languages', style: TextStyle(fontWeight: FontWeight.bold))
]),
), //container
Column(
children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
FlatButton(
onPressed: () {},
color: Colors.blueGrey,
padding: EdgeInsets.all(40.0),
child: Text('something else')),
FlatButton(
onPressed: () {},
color: Colors.blueGrey,
padding: EdgeInsets.all(40.0),
child: Text('something else')),
],
),
SizedBox(height: 10),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
FlatButton(
onPressed: () {},
color: Colors.blueGrey,
padding: EdgeInsets.all(40.0),
child: Text('something else')),
FlatButton(
onPressed: () {},
color: Colors.blueGrey,
padding: EdgeInsets.all(40.0),
child: Text('something else')),
],
),
],
),
Container(
color: Colors.green,
child: Row(children: <Widget>[
Icon(Icons.location_city),
Text('Languages', style: TextStyle(fontWeight: FontWeight.bold))
]),
),
], //children
), //column
), //SingleChildScrollView
), //scafold
); //material app
} // Widget build
} //myApp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment