import 'package:bus_infotainment/pages/settings.dart'; import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; class InitialStartup extends StatefulWidget { @override State createState() => _InitialStartupState(); } const String Version = "0.2.0"; class _InitialStartupState extends State { bool AllowPassage = false; @override Widget build(BuildContext context) { // TODO: implement build return Scaffold( body: Container( alignment: Alignment.center, child: Column( mainAxisSize: MainAxisSize.min, children: [ SizedBox( height: 8, ), AnnouncementUpload( onUploaded: () { AllowPassage = true; setState(() { }); }, ), if (AllowPassage) Container( margin: EdgeInsets.all(8), height: 32, width: double.infinity, child: ElevatedButton( onPressed: (){ Navigator.pushNamed(context, "/application"); }, // make the corner radius 4, background color match the theme, and text colour white, fill to width of parent style: ElevatedButton.styleFrom( backgroundColor: Colors.green, // foregroundColor: Colors.white, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(4) ), ), child: Text( "Continue to application...", style: GoogleFonts.interTight( fontSize: 15, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: 0.5 ) ) ), ), SizedBox( height: 8, ), Text( "Version $Version", style: GoogleFonts.inter( fontSize: 12, fontWeight: FontWeight.w400, color: Colors.grey ), ) ], ) ), ); } }