mongol 0.5.0 mongol: ^0.5.0 copied to clipboard
This package provides Flutter widgets to display vertical Mongolian.
import 'package:flutter/material.dart';
import 'demos/alert_dialog_demo.dart';
import 'demos/gesture_detector_demo.dart';
import 'demos/text_demo.dart';
void main() => runApp(DemoApp());
class DemoApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'mongol',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: Scaffold(
appBar: AppBar(title: Text('Mongol package demo')),
body: HomeScreen(),
),
);
}
}
class HomeScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return ListView(
children: <Widget>[
DemoTile(
title: 'MongolText',
destination: TextDemo(),
),
DemoTile(
title: 'MongolText with GestureDetector',
destination: GestureDetectorDemo(),
),
DemoTile(
title: 'MongolAlertDialog',
destination: AlertDialogDemo(),
),
],
);
}
}
class DemoTile extends StatelessWidget {
const DemoTile({
Key key,
@required this.title,
@required this.destination,
}) : super(key: key);
final String title;
final Widget destination;
@override
Widget build(BuildContext context) {
return ListTile(
title: Text(title),
onTap: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => destination),
);
},
);
}
}