Untitled
unknown
dart
10 months ago
2.8 kB
4
Indexable
import 'package:flutter/material.dart'; void main() { runApp(MyApp()); } class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( home: NationalityScreen(), ); } } class NationalityScreen extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text(''), leading: IconButton( icon: Icon(Icons.arrow_back), onPressed: () { // Add your back button action here }, ), ), body: Padding( padding: const EdgeInsets.all(16.0), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Center( child: Image.asset( 'assets/logo.png', // Make sure to add your logo asset here height: 50, ), ), SizedBox(height: 20), Text( "what's your nationality?", style: TextStyle( fontSize: 18, fontWeight: FontWeight.w500, ), ), SizedBox(height: 10), Text( 'Make sure to enter your real nationality to unlock special offers and prizes just for you!', style: TextStyle( fontSize: 16, fontWeight: FontWeight.w400, ), ), SizedBox(height: 20), DropdownButtonFormField<String>( decoration: InputDecoration( border: OutlineInputBorder(), contentPadding: EdgeInsets.symmetric(horizontal: 10), ), hint: Text('Select nationality*'), items: <String>['Nationality 1', 'Nationality 2', 'Nationality 3'] .map((String value) { return DropdownMenuItem<String>( value: value, child: Text(value), ); }).toList(), onChanged: (String? newValue) { // Handle change }, ), SizedBox(height: 20), Center( child: ElevatedButton( onPressed: () { // Add your next button action here }, style: ElevatedButton.styleFrom( // primary: Colors.black, // Button color // onPrimary: Colors.white, // Text color padding: EdgeInsets.symmetric(horizontal: 50, vertical: 15), ), child: Text('Next'), ), ), ], ), ), ); } }
Editor is loading...
Leave a Comment