-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
384 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:url_launcher/url_launcher.dart'; | ||
|
||
class LinkedCard extends StatelessWidget { | ||
final double width; | ||
final String text; | ||
final String url; | ||
const LinkedCard( | ||
{Key? key, required this.text, required this.url, this.width = 500}) | ||
: super(key: key); | ||
@override | ||
Widget build(BuildContext context) { | ||
return SizedBox( | ||
width: (MediaQuery.of(context).size.width > width * 1.5) | ||
? width | ||
: double.infinity, | ||
child: Card( | ||
child: LimitedBox( | ||
maxWidth: 200, | ||
child: ListTile( | ||
title: Text(text), | ||
subtitle: Text(url), | ||
trailing: TextButton( | ||
child: const Text('前往'), | ||
onPressed: () { | ||
launch(url); | ||
}, | ||
), | ||
), | ||
)), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
class MyDrawer extends StatelessWidget { | ||
const MyDrawer({Key? key}) : super(key: key); | ||
@override | ||
Widget build(BuildContext context) { | ||
return Drawer( | ||
child: ListView( | ||
padding: EdgeInsets.zero, | ||
children: <Widget>[ | ||
DrawerHeader( | ||
decoration: BoxDecoration( | ||
color: Colors.blue[300], | ||
), | ||
child: const Text( | ||
'很高興為您服務', | ||
style: TextStyle( | ||
color: Colors.white, | ||
fontSize: 24, | ||
), | ||
), | ||
), | ||
ListTile( | ||
leading: const Icon(Icons.home), | ||
title: const Text('首頁'), | ||
onTap: () { | ||
Navigator.pushReplacementNamed(context, '/'); | ||
}), | ||
ListTile( | ||
leading: const Icon(Icons.description), | ||
title: const Text('海報張貼系統'), | ||
onTap: () { | ||
Navigator.pushReplacementNamed(context, '/poster'); | ||
}, | ||
), | ||
ListTile( | ||
leading: const Icon(Icons.build), | ||
title: const Text('器材借用'), | ||
onTap: () { | ||
Navigator.pushReplacementNamed(context, '/equipment'); | ||
}, | ||
), | ||
ListTile( | ||
leading: const Icon(Icons.paid), | ||
title: const Text('活動補助申請'), | ||
onTap: () { | ||
Navigator.pushReplacementNamed(context, '/activity'); | ||
}, | ||
), | ||
ListTile( | ||
leading: const Icon(Icons.groups), | ||
title: const Text('學生權益'), | ||
onTap: () { | ||
Navigator.pushReplacementNamed(context, '/right'); | ||
}, | ||
), | ||
ListTile( | ||
leading: const Icon(Icons.public), | ||
title: const Text('相關連結'), | ||
onTap: () { | ||
Navigator.pushReplacementNamed(context, '/links'); | ||
}, | ||
), | ||
ListTile( | ||
leading: const Icon(Icons.info), | ||
title: const Text('關於學生會'), | ||
onTap: () { | ||
Navigator.pushReplacementNamed(context, '/about'); | ||
}, | ||
), | ||
/* | ||
ListTile( | ||
leading: const Icon(Icons.account_circle), | ||
title: const Text('學生會活動'), | ||
onTap: () { | ||
Navigator.pushReplacementNamed(context, '/about'); | ||
}, | ||
), | ||
ListTile( | ||
leading: const Icon(Icons.contact_mail), | ||
title: const Text('聯絡我們'), | ||
), | ||
*/ | ||
], | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:io_github_nchusg/components/drawer.dart'; | ||
|
||
class AboutPage extends StatefulWidget { | ||
const AboutPage({Key? key}) : super(key: key); | ||
@override | ||
State<AboutPage> createState() => _AboutPageState(); | ||
} | ||
|
||
class _AboutPageState extends State<AboutPage> { | ||
@override | ||
Widget build(BuildContext context) { | ||
return Scaffold( | ||
appBar: AppBar(title: const Text('關於學生會')), | ||
drawer: MyDrawer(), | ||
body: Center( | ||
child: Text( | ||
'關於學生會', | ||
style: Theme.of(context).textTheme.headline4, | ||
), | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:io_github_nchusg/components/drawer.dart'; | ||
|
||
class ActivityPage extends StatefulWidget { | ||
const ActivityPage({Key? key}) : super(key: key); | ||
@override | ||
State<ActivityPage> createState() => _ActivityPageState(); | ||
} | ||
|
||
class _ActivityPageState extends State<ActivityPage> { | ||
@override | ||
Widget build(BuildContext context) { | ||
return Scaffold( | ||
appBar: AppBar(title: const Text('社團/系學會活動補助申請')), | ||
drawer: MyDrawer(), | ||
body: Center( | ||
child: Text( | ||
'社團/系學會活動補助申請', | ||
style: Theme.of(context).textTheme.headline4, | ||
), | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:io_github_nchusg/components/drawer.dart'; | ||
|
||
class EquipmentPage extends StatefulWidget { | ||
const EquipmentPage({Key? key}) : super(key: key); | ||
@override | ||
State<EquipmentPage> createState() => _EquipmentPageState(); | ||
} | ||
|
||
class _EquipmentPageState extends State<EquipmentPage> { | ||
@override | ||
Widget build(BuildContext context) { | ||
return Scaffold( | ||
appBar: AppBar(title: const Text('器材借用')), | ||
drawer: MyDrawer(), | ||
body: Center( | ||
child: Text( | ||
'器材借用', | ||
style: Theme.of(context).textTheme.headline4, | ||
), | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:io_github_nchusg/components/drawer.dart'; | ||
import 'package:io_github_nchusg/components/card.dart'; | ||
|
||
class LinksPage extends StatefulWidget { | ||
const LinksPage({Key? key}) : super(key: key); | ||
@override | ||
State<LinksPage> createState() => _LinksPageState(); | ||
} | ||
|
||
class _LinksPageState extends State<LinksPage> { | ||
@override | ||
Widget build(BuildContext context) { | ||
return Scaffold( | ||
appBar: AppBar(title: const Text('相關連結')), | ||
drawer: const MyDrawer(), | ||
body: Scrollbar( | ||
isAlwaysShown: true, | ||
child: SingleChildScrollView( | ||
child: Center( | ||
child: Column( | ||
crossAxisAlignment: CrossAxisAlignment.center, | ||
children: [ | ||
Text( | ||
'相關連結', | ||
style: Theme.of(context).textTheme.headline4, | ||
), | ||
const LinkedCard( | ||
text: '會長令、各部門公告', url: 'https://reurl.cc/W3zM5y'), | ||
const LinkedCard( | ||
text: '第27屆總預算案', url: 'https://reurl.cc/8n7KbR'), | ||
const LinkedCard( | ||
text: '第27屆總決算案', url: 'https://reurl.cc/R0gXnx'), | ||
const LinkedCard( | ||
text: '學權申訴系統', url: 'https://reurl.cc/gzaRbL'), | ||
const LinkedCard( | ||
text: '社團海報張貼申請', url: 'https://reurl.cc/kLapEG '), | ||
]))))); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:io_github_nchusg/components/drawer.dart'; | ||
|
||
class PosterPage extends StatefulWidget { | ||
const PosterPage({Key? key}) : super(key: key); | ||
@override | ||
State<PosterPage> createState() => _PosterPageState(); | ||
} | ||
|
||
class _PosterPageState extends State<PosterPage> { | ||
@override | ||
Widget build(BuildContext context) { | ||
return Scaffold( | ||
appBar: AppBar(title: const Text('海報張貼系統')), | ||
drawer: MyDrawer(), | ||
body: Center( | ||
child: Text( | ||
'海報張貼系統', | ||
style: Theme.of(context).textTheme.headline4, | ||
), | ||
), | ||
); | ||
} | ||
} |
Oops, something went wrong.