Files
GroundedHelper/frontend/lib/Grounded/see/system/sessionexpired/SessionExpiredState.dart
alvocool d3431ca5de Switch to Inter, round the corners softly and make the nav switch tabs
Inter replaces General Sans (Inter Display for titles and big numbers).
Corners come back from before the squaring commit, scaled to a soft set
(16 cards, 14 buttons, 12 rows, 8 chips) and applied to the screens built
since. The nav is now a cluster of round frosted buttons that switches
Today, Routines, Goals, Groups and Progress in place inside Home: no
pushed pages, no back arrows, and Android back returns to Today.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KhQh614DMeYoQEH9SoMRUw
2026-11-09 07:08:46 +03:00

118 lines
3.9 KiB
Dart

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:stacked/stacked.dart';
import '../../../about/internal/application/NavigatorType.dart';
import '../../../about/internal/application/TextType.dart';
import '../../../configs/Navigator.dart';
import '../../../designs/Responsive.dart';
import '../../../designs/buttons/Buttons.dart';
import '../../../designs/text/Text.dart';
import '../../../utils/Colors.dart';
import '../../login/Login.dart';
import 'ConnectSessionExpired.dart';
import 'SessionExpired.dart';
import 'ViewSessionExpired.dart';
class SessionExpiredState extends State<SessionExpired>
implements ConnectSessionExpired {
ViewSessionExpired? _model;
@override
Widget build(BuildContext context) {
return ViewModelBuilder<ViewSessionExpired>.reactive(
viewModelBuilder: () => ViewSessionExpired(context, this),
onViewModelReady: (viewModel) {
_model = viewModel;
_initiate();
},
builder: (context, viewModel, child) => PopScope(
canPop: false,
child: Scaffold(
backgroundColor: colorPrimaryDark,
body: LayoutBuilder(
builder: (BuildContext context, BoxConstraints constraints) {
return Responsive(
mobile: _mobileView(constraints),
tablet: _mobileView(constraints),
desktop: _mobileView(constraints),
);
},
),
),
),
);
}
void _initiate() {}
void _onSignIn() {
_model?.signOut();
}
Widget _mobileView(BoxConstraints constraints) {
return SafeArea(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 28, vertical: 32),
child: Column(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
text("GROUNDED", 10, TextType.Bold,
color: colorWhite.withValues(alpha: 0.45), letterSpacing: 2.0),
Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: 60,
height: 60,
alignment: Alignment.center,
decoration: BoxDecoration(
color: colorWhite.withValues(alpha: 0.10),
borderRadius: BorderRadius.circular(14),
),
child: Icon(CupertinoIcons.lock_fill,
size: 24, color: colorWhite),
),
const SizedBox(height: 28),
text("SESSION", 10, TextType.Bold,
color: colorWhite.withValues(alpha: 0.45),
letterSpacing: 1.2),
const SizedBox(height: 10),
text("Your session has ended.", 34, TextType.Light,
color: colorWhite, height: 1.15),
const SizedBox(height: 14),
text(
"Sign in again to pick up where you left off. Your record is intact — nothing was cleared while you were away.",
14,
TextType.Regular,
color: colorWhite.withValues(alpha: 0.60),
height: 1.55,
),
],
),
SizedBox(
width: double.infinity,
child: roundedCornerButton(
"Sign in",
_onSignIn,
background: colorWhite,
foreground: colorPrimaryDark,
icon: CupertinoIcons.arrow_right,
),
),
],
),
),
);
}
@override
void launchLogin() {
GroundedNavigation()
.navigateToPage(NavigatorType.makeNewMain, const Login(), context);
}
}