Browse Source

Added container around the 3 inputs

master
Robby Zambito 5 months ago
parent
commit
addef31318
2 changed files with 53 additions and 25 deletions
  1. +51
    -23
      lib/views/unauthenticated/instance_selector.dart
  2. +2
    -2
      lib/views/unauthenticated/welcome_screen.dart

+ 51
- 23
lib/views/unauthenticated/instance_selector.dart View File

@ -126,7 +126,7 @@ class _InstanceSelectorState extends State {
),
Container(
padding: const EdgeInsets.all(10),
margin: const EdgeInsets.only(top: 10),
margin: const EdgeInsets.only(top: 10, bottom: 15),
constraints: BoxConstraints.expand(
width: 300,
height: 50
@ -135,7 +135,7 @@ class _InstanceSelectorState extends State {
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(20)),
color: Color.fromRGBO(220, 220, 220, 1),
boxShadow: kElevationToShadow[2],
boxShadow: kElevationToShadow[1],
),
child: DirectSelect(
itemExtent: 35,
@ -162,17 +162,31 @@ class _InstanceSelectorState extends State {
child: Text("State"),
),
),
DirectSelect(
itemExtent: 35,
selectedIndex: _selectedStateIndex,
child: _buildStateList()[_selectedStateIndex],
onSelectedItemChanged: (index) {
setState(() {
_selectedStateIndex = index;
_selectedCityIndex = 0;
});
},
items: _buildStateList(),
Container(
padding: const EdgeInsets.all(10),
margin: const EdgeInsets.only(top: 10, bottom: 15),
constraints: BoxConstraints.expand(
width: 300,
height: 50
),
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(20)),
color: Color.fromRGBO(220, 220, 220, 1),
boxShadow: kElevationToShadow[1],
),
child: DirectSelect(
itemExtent: 35,
selectedIndex: _selectedStateIndex,
child: _buildStateList()[_selectedStateIndex],
onSelectedItemChanged: (index) {
setState(() {
_selectedStateIndex = index;
_selectedCityIndex = 0;
});
},
items: _buildStateList(),
),
),
],
)
@ -185,16 +199,30 @@ class _InstanceSelectorState extends State {
child: Text("City"),
),
),
DirectSelect(
itemExtent: 35,
selectedIndex: _selectedCityIndex,
child: _buildCityList()[_selectedCityIndex],
onSelectedItemChanged: (index) {
setState(() {
_selectedCityIndex = index;
});
},
items: _buildCityList(),
Container(
padding: const EdgeInsets.all(10),
margin: const EdgeInsets.only(top: 10, bottom: 15),
constraints: BoxConstraints.expand(
width: 300,
height: 50
),
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(20)),
color: Color.fromRGBO(220, 220, 220, 1),
boxShadow: kElevationToShadow[1],
),
child: DirectSelect(
itemExtent: 35,
selectedIndex: _selectedCityIndex,
child: _buildCityList()[_selectedCityIndex],
onSelectedItemChanged: (index) {
setState(() {
_selectedCityIndex = index;
});
},
items: _buildCityList(),
),
),
],
)

+ 2
- 2
lib/views/unauthenticated/welcome_screen.dart View File

@ -32,7 +32,7 @@ class WelcomeScreen extends StatelessWidget {
children: [
Center(
child: Padding(
padding: const EdgeInsets.only(top: 80, left: 15, right: 15),
padding: const EdgeInsets.only(top: 70, left: 15, right: 15),
child: Text(
'Welcome to Hamlet!',
textScaleFactor: 2.5,
@ -41,7 +41,7 @@ class WelcomeScreen extends StatelessWidget {
),
Expanded(
child: Container(
margin: const EdgeInsets.only(top: 150),
margin: const EdgeInsets.only(top: 100),
child: InstanceSelector(hamletInstances)),
),
],

Loading…
Cancel
Save