Layout created for single screen app

This commit is contained in:
2022-09-02 23:10:06 +01:00
parent 1e5bbad051
commit 8967fab218
12 changed files with 541 additions and 87 deletions

View File

@@ -0,0 +1,37 @@
import 'package:dropdown_search/dropdown_search.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import '../Utils/Constants.dart';
class DropDownBox extends StatelessWidget {
final List<String> _selection;
final Function(String?) _onChanged;
const DropDownBox(this._selection, this._onChanged, {super.key});
@override
Widget build(BuildContext context) {
return Card(
color: colourThree,
elevation: 2,
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(22))),
child: DropdownSearch<String>(
popupProps: const PopupProps.dialog(showSearchBox: true),
items: _selection,
dropdownDecoratorProps: const DropDownDecoratorProps(
dropdownSearchDecoration: InputDecoration(
contentPadding: EdgeInsets.all(14),
border: InputBorder.none,
filled: true,
fillColor: Colors.transparent,
hintText: "Select a currency",
),
),
onChanged: _onChanged,
),
);
}
}