Improve login and settings visuals

This commit is contained in:
Nutcake 2023-05-03 18:16:40 +02:00
parent 47e3b85451
commit 6ea136ce3b
7 changed files with 12 additions and 8 deletions

View file

@ -1,6 +1,6 @@
import 'dart:developer';
import 'package:contacts_plus_plus/widgets/home_screen.dart';
import 'package:contacts_plus_plus/widgets/friends_list.dart';
import 'package:contacts_plus_plus/widgets/login_screen.dart';
import 'package:flutter/material.dart';
import 'package:flutter_phoenix/flutter_phoenix.dart';

View file

@ -4,7 +4,6 @@ import 'dart:developer';
import 'package:contacts_plus_plus/api_client.dart';
import 'package:contacts_plus_plus/apis/message_api.dart';
import 'package:contacts_plus_plus/auxiliary.dart';
import 'package:contacts_plus_plus/models/session.dart';
import 'package:uuid/uuid.dart';
enum MessageType {

View file

@ -2,5 +2,4 @@
class Settings {
// No settings right now.
}

View file

@ -81,6 +81,9 @@ class _LoginScreenState extends State<LoginScreen> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text("Contacts++"),
),
body: FutureBuilder(
future: _cachedLoginFuture,
builder: (context, snapshot) {
@ -126,7 +129,7 @@ class _LoginScreenState extends State<LoginScreen> {
),
),
if (_isLoading)
const Center(child: CircularProgressIndicator())
const LinearProgressIndicator()
else
TextButton.icon(
onPressed: submit,
@ -144,7 +147,7 @@ class _LoginScreenState extends State<LoginScreen> {
],
);
}
return const Center(child: CircularProgressIndicator(),);
return const LinearProgressIndicator();
}
),
);

View file

@ -1,7 +1,5 @@
import 'package:contacts_plus_plus/api_client.dart';
import 'package:flutter/material.dart';
import 'package:flutter_phoenix/flutter_phoenix.dart';
class SettingsPage extends StatelessWidget {
const SettingsPage({super.key});
@ -21,6 +19,11 @@ class SettingsPage extends StatelessWidget {
body: ListView(
children: [
ListTile(
shape: Border(
bottom: BorderSide(color: Theme.of(context).colorScheme.secondaryContainer, width: 0.5),
top: BorderSide(color: Theme.of(context).colorScheme.secondaryContainer, width: 0.5)
),
trailing: const Icon(Icons.logout),
title: const Text("Sign out"),
onTap: () {
showDialog(

View file

@ -13,7 +13,7 @@ import 'package:contacts_plus_plus/main.dart';
void main() {
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(ContactsPlusPlus());
await tester.pumpWidget(const ContactsPlusPlus());
// Verify that our counter starts at 0.
expect(find.text('0'), findsOneWidget);