Added: show version in user settings, CI: generated releases
	
		
			
	
		
	
	
		
	
		
			Some checks failed
		
		
	
	
		
			
				
	
				Build and Release APK / release (push) Failing after 9s
				
			
		
		
	
	
				
					
				
			
		
			Some checks failed
		
		
	
	Build and Release APK / release (push) Failing after 9s
				
			This commit is contained in:
		@@ -1,18 +1,27 @@
 | 
			
		||||
import 'package:flutter/material.dart';
 | 
			
		||||
import 'package:package_info_plus/package_info_plus.dart';
 | 
			
		||||
 | 
			
		||||
class UserSettingsScreen extends StatelessWidget {
 | 
			
		||||
  Future<String> _getVersion() async {
 | 
			
		||||
    final info = await PackageInfo.fromPlatform();
 | 
			
		||||
    //return 'Version: ${info.version}+${info.buildNumber}';
 | 
			
		||||
    return 'Version: ${info.version}';
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  @override
 | 
			
		||||
  Widget build(BuildContext context) {
 | 
			
		||||
    return Scaffold(
 | 
			
		||||
      appBar: AppBar(title: Text('User settings')),
 | 
			
		||||
      body: Center(
 | 
			
		||||
        child: Column(
 | 
			
		||||
          spacing: 20.0,
 | 
			
		||||
          mainAxisSize: MainAxisSize.min,
 | 
			
		||||
          children: [
 | 
			
		||||
            const Text(
 | 
			
		||||
              "Test User",
 | 
			
		||||
              style: TextStyle(fontSize: 32, fontWeight: FontWeight.bold),
 | 
			
		||||
            ),
 | 
			
		||||
 | 
			
		||||
            SizedBox(height: 20),
 | 
			
		||||
            ElevatedButton.icon(
 | 
			
		||||
              onPressed: () {
 | 
			
		||||
                // TODO: Add sign-out logic here
 | 
			
		||||
@@ -24,6 +33,20 @@ class UserSettingsScreen extends StatelessWidget {
 | 
			
		||||
                foregroundColor: Colors.white,
 | 
			
		||||
              ),
 | 
			
		||||
            ),
 | 
			
		||||
            SizedBox(height: 8),
 | 
			
		||||
            FutureBuilder<String>(
 | 
			
		||||
              future: _getVersion(),
 | 
			
		||||
              builder: (context, snapshot) {
 | 
			
		||||
                if (snapshot.connectionState == ConnectionState.done) {
 | 
			
		||||
                  return Text(
 | 
			
		||||
                    snapshot.data ?? '',
 | 
			
		||||
                    style: TextStyle(color: Colors.grey),
 | 
			
		||||
                  );
 | 
			
		||||
                } else {
 | 
			
		||||
                  return SizedBox.shrink();
 | 
			
		||||
                }
 | 
			
		||||
              },
 | 
			
		||||
            ),
 | 
			
		||||
          ],
 | 
			
		||||
        ),
 | 
			
		||||
      ),
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user