32 lines
983 B
Dart
32 lines
983 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:localization/localization.dart';
|
|
import 'package:loris/business_logic/timeline/timeline.dart';
|
|
import 'package:url_launcher/url_launcher.dart';
|
|
|
|
void popupPostOptions(context, PostModel model) {
|
|
showDialog(
|
|
context: context,
|
|
builder: (context) {
|
|
return SimpleDialog(
|
|
titleTextStyle: Theme.of(context).textTheme.titleMedium,
|
|
backgroundColor: Theme.of(context).colorScheme.surface,
|
|
title: SelectableText("post-options".i18n()),
|
|
alignment: Alignment.center,
|
|
contentPadding: const EdgeInsetsDirectional.all(8),
|
|
children: [
|
|
SelectableText(model.createdAt),
|
|
TextButton.icon(
|
|
onPressed: () {
|
|
launchUrl(
|
|
Uri.parse(model.uri),
|
|
);
|
|
},
|
|
icon: const Icon(Icons.open_in_browser),
|
|
label: Text("show-in-browser".i18n()),
|
|
),
|
|
],
|
|
);
|
|
},
|
|
);
|
|
}
|