💄 Optimized UX
This commit is contained in:
@@ -1,14 +1,22 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:webview_flutter/webview_flutter.dart';
|
||||
|
||||
class AuthorizationScreen extends StatelessWidget {
|
||||
class ApplicationScreen extends StatelessWidget {
|
||||
final Uri link;
|
||||
final String title;
|
||||
|
||||
const AuthorizationScreen(this.link, {super.key});
|
||||
const ApplicationScreen({super.key, required this.link, required this.title});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: PreferredSize(
|
||||
preferredSize: const Size.fromHeight(32.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 18),
|
||||
child: AppBar(),
|
||||
)
|
||||
),
|
||||
body: SafeArea(
|
||||
child: WebViewWidget(
|
||||
controller: WebViewController()
|
||||
|
@@ -1,10 +1,9 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:goatagent/screens/application.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
|
||||
import 'application.dart';
|
||||
|
||||
class DashboardScreen extends StatefulWidget {
|
||||
const DashboardScreen({super.key});
|
||||
|
||||
@@ -46,9 +45,11 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
||||
return Card(
|
||||
child: InkWell(
|
||||
onTap: () async {
|
||||
await Navigator.of(context).push(MaterialPageRoute(
|
||||
builder: (context) => AuthorizationScreen(
|
||||
Uri.parse(element["link"]),
|
||||
var link = element["link"];
|
||||
Navigator.of(context, rootNavigator: true).push(MaterialPageRoute(
|
||||
builder: (context) => ApplicationScreen(
|
||||
link: Uri.parse(link),
|
||||
title: element["name"],
|
||||
),
|
||||
));
|
||||
},
|
||||
|
Reference in New Issue
Block a user