Notes
![]() ![]() Notes - notes.io |
import 'package:carousel_slider/carousel_slider.dart';
void main() {
runApp(const MyApp());
}
late PageController _pageController;
List<String> urlImages = [
"https://cdn3.shoppy.mn/spree/images/1018315/large/b1000.jpg",
"https://www.tolgoilogch.mn/i/1910/MN-LUAENIU-U73YF7X-UPM2T2L-8P",
"https://updown.mn/wp-content/uploads/2020/05/dalai.jpg",
"https://mgl.gogo.mn/newsn/np/2020/07/27/5137763/DSC_1387-174618-19316143251.jpeg"
];
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
Widget titleSection = Container(
padding: const EdgeInsets.all(32),
child: Row(
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
padding: const EdgeInsets.only(bottom: 8),
child: const Text(
'Хөвсгөл далай',
style: TextStyle(
fontWeight: FontWeight.bold,
),
),
),
Text(
'Khatgal, Mongolia',
style: TextStyle(
color: Colors.grey[500],
),
),
],
),
),
Icon(
Icons.star,
color: Colors.red[500],
),
const Text('98'),
],
),
);
Color color = Theme.of(context).primaryColor;
Widget buttonSection = Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
_buildButtonColumn(color, Icons.favorite, 'LIKE'),
_buildButtonColumn(color, Icons.near_me, 'ROUTE'),
_buildButtonColumn(color, Icons.share, 'SHARE'),
],
);
Widget textSection = const Padding(
padding: EdgeInsets.all(32),
child: Text(
'Хөвсгөл нуур нь Монгол улсын хойд хэсэгт Хөвсгөл'
'аймагт оршдог. Энэ нуур нь Монголын хамгийн их '
'эзлэхүүнтэй, хамгийн гүн нуур юм. Хөвсгөл нуур нь'
' дэлхийн арван долоон эртний нуурын нэг юм. 2 сая'
' гаруй жилийн настай хэмээн тооцоолсон байдаг.'
' Нийт усны эзлэхүүн 381 км³ байдаг нь дэлхийн '
'цэнгэг усны 0.4 хувьтай тэнцэнэ.',
softWrap: true,
),
);
return MaterialApp(
title: 'Flutter layout demo',
home: Scaffold(
appBar: AppBar(
title: const Text('Монголоороо аялья'),
),
body: ListView(
children: [
CarouselSlider.builder(
itemCount: urlImages.length,
itemBuilder: (context, index, realIndex) {
final urlImage = urlImages[index];
return buildImage(urlImage, index);
},
options: CarouselOptions(height: 300)),
titleSection,
buttonSection,
textSection,
],
),
),
);
}
Column _buildButtonColumn(Color color, IconData icon, String label) {
return Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(icon, color: color),
Container(
margin: const EdgeInsets.only(top: 8),
child: Text(
label,
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w400,
color: color,
),
),
),
],
);
}
}
Widget buildImage(String urlImage, int index) => Container(
margin: EdgeInsets.symmetric(horizontal: 12),
color: Colors.grey,
child: Image.network(
urlImage,
fit: BoxFit.cover,
),
);
![]() |
Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 14 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team