Added subtitles to overhang meta actions
This commit is contained in:
parent
b8e4dd4d07
commit
0770ba49eb
lib
@ -1,6 +1,7 @@
|
||||
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
import 'package:marianum_mobile/api/apiResponse.dart';
|
||||
|
||||
import '../../../apiResponse.dart';
|
||||
|
||||
part 'getParticipantsResponse.g.dart';
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
import 'package:marianum_mobile/api/apiResponse.dart';
|
||||
|
||||
import '../../../apiResponse.dart';
|
||||
|
||||
part 'getReactionsResponse.g.dart';
|
||||
|
||||
|
@ -1,13 +1,13 @@
|
||||
import 'dart:developer';
|
||||
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'package:marianum_mobile/api/apiResponse.dart';
|
||||
|
||||
import '../../../model/accountData.dart';
|
||||
import '../../../model/endpointData.dart';
|
||||
import '../../apiError.dart';
|
||||
import '../../apiParams.dart';
|
||||
import '../../apiRequest.dart';
|
||||
import '../../apiResponse.dart';
|
||||
|
||||
enum TalkApiMethod {
|
||||
get,
|
||||
|
@ -1,8 +1,8 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:localstore/localstore.dart';
|
||||
import 'package:marianum_mobile/api/apiResponse.dart';
|
||||
|
||||
import 'apiResponse.dart';
|
||||
import 'webuntis/webuntisError.dart';
|
||||
|
||||
abstract class RequestCache<T extends ApiResponse?> {
|
||||
|
5
lib/extensions/renderNotNull.dart
Normal file
5
lib/extensions/renderNotNull.dart
Normal file
@ -0,0 +1,5 @@
|
||||
extension RenderNotNullExt<T> on T? {
|
||||
R? wrapNullable<R>(R Function(T data) defaultValueCallback) {
|
||||
return this != null ? defaultValueCallback(this as T) : null;
|
||||
}
|
||||
}
|
@ -1,11 +1,14 @@
|
||||
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:in_app_review/in_app_review.dart';
|
||||
import 'package:marianum_mobile/widget/infoDialog.dart';
|
||||
import 'package:marianum_mobile/extensions/renderNotNull.dart';
|
||||
import 'package:persistent_bottom_nav_bar_v2/persistent-tab-view.dart';
|
||||
|
||||
import '../../widget/ListItem.dart';
|
||||
import '../../widget/centeredLeading.dart';
|
||||
import '../../widget/infoDialog.dart';
|
||||
import '../settings/settings.dart';
|
||||
import 'more/feedback/feedbackDialog.dart';
|
||||
import 'more/gradeAverages/gradeAverage.dart';
|
||||
@ -37,6 +40,7 @@ class Overhang extends StatelessWidget {
|
||||
ListTile(
|
||||
leading: const Icon(Icons.share_outlined),
|
||||
title: const Text("Teile die App"),
|
||||
subtitle: const Text("Mit Freunden und deiner Klasse teilen"),
|
||||
trailing: const Icon(Icons.arrow_right),
|
||||
onTap: () => showDialog(context: context, builder: (context) => const SelectShareTypeDialog())
|
||||
),
|
||||
@ -45,11 +49,18 @@ class Overhang extends StatelessWidget {
|
||||
builder: (context, snapshot) {
|
||||
if(!snapshot.hasData) return const SizedBox.shrink();
|
||||
|
||||
String? getPlatformStoreName() {
|
||||
if(Platform.isAndroid) return "Play store";
|
||||
if(Platform.isIOS) return "App store";
|
||||
return null;
|
||||
}
|
||||
|
||||
return Visibility(
|
||||
visible: snapshot.requireData,
|
||||
child: ListTile(
|
||||
leading: const CenteredLeading(Icon(Icons.star_rate_outlined)),
|
||||
title: const Text("App Bewerten"),
|
||||
subtitle: getPlatformStoreName().wrapNullable((data) => Text("Im $data")),
|
||||
trailing: const Icon(Icons.arrow_right),
|
||||
onTap: () {
|
||||
InAppReview.instance.openStoreListing(appStoreId: "6458789560").then(
|
||||
|
Loading…
x
Reference in New Issue
Block a user