dateapp/lib/pages/settings.dart

113 lines
4.5 KiB
Dart
Raw Normal View History

2024-02-11 21:45:43 +07:00
import 'package:flutter/material.dart';
2024-03-03 18:04:45 +07:00
import 'package:url_launcher/url_launcher.dart';
import '../widgets/dialogs/about.dart';
import '../widgets/dialogs/community.dart';
2024-02-11 21:45:43 +07:00
class SettingsScreen extends StatelessWidget {
const SettingsScreen({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return const Scaffold(
body: _Body(),
);
}
}
class _Body extends StatelessWidget {
const _Body();
@override
Widget build(BuildContext context) {
2024-03-04 19:09:36 +07:00
final textTheme = Theme.of(context).textTheme;
2024-02-11 21:45:43 +07:00
return Scaffold(
body: Column(
children: [
Expanded(
child: Padding(
2024-03-04 19:35:51 +07:00
padding: const EdgeInsets.all(16),
child: ListView(
children: [
Column(
children: [
Container(
alignment: Alignment.centerLeft,
child: Row(
children: <Widget>[
Text("Settings",
style: TextStyle(
fontSize:
textTheme.displayMedium?.fontSize,
fontWeight: FontWeight.bold))
],
)),
Card(
elevation: 4,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0)),
margin: const EdgeInsets.all(8.0),
child: Column(
children: [
InkWell(
onTap: () async {
await launchUrl(
Uri.parse(
'https://git.winscloud.net/WinsDominoes/dateapp'),
mode: LaunchMode.externalApplication);
},
borderRadius: const BorderRadius.only(
topLeft: Radius.circular(10.0),
topRight: Radius.circular(10.0)),
child: const ListTile(
leading: Icon(Icons.code),
title: Text("Source Code"),
trailing: Wrap(
// space between two icons
children: <Widget>[
Icon(
Icons.open_in_new), // icon-1// icon-2
],
),
),
),
const Divider(
height: 1.0,
),
InkWell(
onTap: () => communityDialogBuilder(context),
borderRadius: const BorderRadius.only(
bottomLeft: Radius.circular(10.0),
bottomRight: Radius.circular(10.0)),
child: const ListTile(
leading: Icon(Icons.people),
title: Text("Join Community"),
)),
],
),
),
Card(
elevation: 4.0,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0)),
margin: const EdgeInsets.all(8.0),
child: InkWell(
onTap: () => aboutDialogBuilder(context),
borderRadius:
const BorderRadius.all(Radius.circular(10.0)),
child: const ListTile(
leading: Icon(Icons.info_outlined),
title: Text("About"),
),
))
],
),
],
)),
2024-02-11 21:45:43 +07:00
)
],
),
);
}
}