Merge pull request #9 from oob-provisioning-for-iot/justin
fixed error and added some functions for devices list
This commit is contained in:
commit
a705ec52a3
|
@ -18,10 +18,10 @@ Future<Map<String, dynamic>> readJson() async {
|
|||
|
||||
class CloudServiceAPI {
|
||||
static late final Map<String, dynamic> credentials;
|
||||
static late String _basicAuth;
|
||||
static late String _address;
|
||||
static late String _username;
|
||||
static late String _password;
|
||||
static String _basicAuth = "";
|
||||
static String _address = "";
|
||||
static String _username = "";
|
||||
static String _password = "";
|
||||
static late Map<String, String> _headers;
|
||||
static bool _initState = false;
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@ class _RegisteredDevicesScreen extends State<RegisteredDevicesScreen> {
|
|||
final CloudServiceAPI _cloudServiceAPI = CloudServiceAPI();
|
||||
|
||||
// static SharedPreferences? preferencesInstance;
|
||||
String _searchText = "";
|
||||
bool _isFetching = false;
|
||||
|
||||
Future<void> _fetchRegisteredDevices() async {
|
||||
|
@ -89,6 +90,35 @@ class _RegisteredDevicesScreen extends State<RegisteredDevicesScreen> {
|
|||
physics: const ScrollPhysics(),
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
SingleSection(
|
||||
title: "Allgemeines",
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16.0, vertical: 8.0),
|
||||
child: TextFormField(
|
||||
obscureText: false,
|
||||
decoration: InputDecoration(
|
||||
border: const OutlineInputBorder(),
|
||||
hintText: 'Enter the server password',
|
||||
labelText: "Search",
|
||||
suffixIcon: IconButton(
|
||||
icon: const Icon(Icons.search),
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
// TODO Suchfunktion
|
||||
});
|
||||
},
|
||||
),
|
||||
filled: true,
|
||||
),
|
||||
keyboardType: TextInputType.text,
|
||||
onChanged: (String newValue) {
|
||||
_searchText = newValue;
|
||||
},
|
||||
),
|
||||
),
|
||||
]
|
||||
),
|
||||
SingleSection(
|
||||
title: "Registered Bluetooth Devices",
|
||||
children: [
|
||||
|
@ -100,7 +130,7 @@ class _RegisteredDevicesScreen extends State<RegisteredDevicesScreen> {
|
|||
DeviceInfoModel entry = _registeredInfoDevices![index];
|
||||
//DeviceInfoModel entryInfo = await _cloudServiceAPI.getDeviceInfo(entry.id);
|
||||
return CustomListTile(
|
||||
title: entry.id,
|
||||
title: "${entry.id} \nentrypoint: ${entry.endpoint} \nstatus: ${entry.status} \nconnection: ${entry.connectionState} \nlast activity: ${entry.lastActivityTime}",
|
||||
icon: Icons.devices,
|
||||
);
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue