-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #248 from mlgzackfly/master
feat: add report page
- Loading branch information
Showing
8 changed files
with
108 additions
and
2 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
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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,45 @@ | ||
import 'package:ap_common/l10n/l10n.dart'; | ||
import 'package:ap_common/resources/ap_theme.dart'; | ||
import 'package:ap_common/utils/analytics_utils.dart'; | ||
import 'package:ap_common/utils/ap_utils.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:nkust_ap/l10n/l10n.dart'; | ||
|
||
class ReportPage extends StatefulWidget { | ||
static const String routerName = '/report'; | ||
|
||
@override | ||
_ReportPageState createState() => _ReportPageState(); | ||
} | ||
|
||
class _ReportPageState extends State<ReportPage> { | ||
final GlobalKey<ScaffoldState> _scaffoldKey = GlobalKey<ScaffoldState>(); | ||
AppLocalizations? app; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
app = AppLocalizations.of(context); | ||
return Scaffold( | ||
key: _scaffoldKey, | ||
appBar: AppBar( | ||
title: Text(app!.reportProblem), | ||
backgroundColor: ApTheme.of(context).blue, | ||
), | ||
body: ListView.builder( | ||
itemCount: 1, | ||
itemBuilder: (BuildContext context, int index) { | ||
return ListTile( | ||
title: Text(app!.reportNetProblem), | ||
subtitle: Text(app!.reportNetProblemSubTitle), | ||
onTap: () async { | ||
const String url = | ||
'https://docs.google.com/forms/d/e/1FAIpQLSfAOZaF-aM4XwuJRXaSp1uzZ1nZqhl7M6-oc4xWrCbM4tqcuw/viewform'; | ||
await ApUtils.launchUrl(url); | ||
AnalyticsUtils.instance?.logEvent('net_problem_click'); | ||
}, | ||
); | ||
}, | ||
), | ||
); | ||
} | ||
} |