mirror of
https://github.com/rainloreley/shlink-manager.git
synced 2024-11-23 10:13:03 +01:00
added link to shlink docs (create api key)
This commit is contained in:
parent
e673dd7b64
commit
8507aaa8bd
|
@ -1,6 +1,7 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:shlink_app/API/server_manager.dart';
|
||||
import 'package:shlink_app/main.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
import '../globals.dart' as globals;
|
||||
|
||||
class LoginView extends StatefulWidget {
|
||||
|
@ -58,6 +59,7 @@ class _LoginViewState extends State<LoginView> {
|
|||
return Scaffold(
|
||||
extendBody: true,
|
||||
body: CustomScrollView(
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
slivers: [
|
||||
const SliverAppBar.medium(
|
||||
title: Text("Add server",
|
||||
|
@ -65,6 +67,9 @@ class _LoginViewState extends State<LoginView> {
|
|||
SliverFillRemaining(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Stack(
|
||||
children: [
|
||||
Align(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
|
@ -139,6 +144,31 @@ class _LoginViewState extends State<LoginView> {
|
|||
textAlign: TextAlign.center))
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: TextButton(
|
||||
onPressed: () async {
|
||||
final Uri url = Uri.parse('https://shlink.io/documentation/api-docs/authentication/');
|
||||
try {
|
||||
if (!await launchUrl(url)) {
|
||||
throw Exception();
|
||||
}
|
||||
} catch (e) {
|
||||
final snackBar = SnackBar(
|
||||
content: Text("Unable to launch url. See Shlink docs for more information.",
|
||||
style: TextStyle(color: Theme.of(context).colorScheme.onError)),
|
||||
backgroundColor: Theme.of(context).colorScheme.error,
|
||||
behavior: SnackBarBehavior.floating);
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
snackBar);
|
||||
}
|
||||
},
|
||||
child: Text("How to create an API Key"),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
|
|
Loading…
Reference in New Issue
Block a user