Open nodermann2 opened 4 years ago
I need to get a change event to call notifyListeners()
See #11 and readme for example.
Yes, I saw it I believe a full-fledged example would be better because #11 is also given an incomplete answer. How do I change this code so that the void selected(String item) method is called every time the user changes the value?
import 'package:flutter/material.dart';
import 'package:shared_preferences_settings/shared_preferences_settings.dart';
class MyScreen extends StatelessWidget {
const MyScreen({Key key}) : super(key: key);
void selected(String item) {
print('selected: $item');
}
@override
Widget build(BuildContext context) {
return Container(
child: RadioPickerSettingsTile(
settingKey: 'hello-key',
title: 'Welcome',
values: {
'a': 'Hello',
'b': 'World',
},
),
);
}
}
I see. Unfortunately, this is not supported atm. I'll add an onChange callback parameter soon.
I see. Unfortunately, this is not supported atm. I'll add an onChange callback parameter soon.
Any news?
I see. Unfortunately, this is not supported atm. I'll add an onChange callback parameter soon.
Any news?
I didn't wait and made my own implementation without this dependency.
I can't figure out where to add the function to get data. Could you provide a full example?