|
|
|
|
@ -43,7 +43,6 @@ class SettingsScreen extends StatefulWidget {
|
|
|
|
|
|
|
|
|
|
class _SettingsScreenState extends State<SettingsScreen> {
|
|
|
|
|
bool _showBatteryVoltage = false;
|
|
|
|
|
bool _deviceInfoExpanded = false;
|
|
|
|
|
String _appVersion = '';
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@ -340,50 +339,12 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
|
|
|
|
final l10n = context.l10n;
|
|
|
|
|
|
|
|
|
|
return Card(
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
InkWell(
|
|
|
|
|
borderRadius: BorderRadius.circular(12),
|
|
|
|
|
onTap: () {
|
|
|
|
|
setState(() {
|
|
|
|
|
_deviceInfoExpanded = !_deviceInfoExpanded;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: const EdgeInsets.fromLTRB(16, 16, 16, 16),
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Text(
|
|
|
|
|
l10n.settings_deviceInfo,
|
|
|
|
|
style: const TextStyle(
|
|
|
|
|
fontSize: 18,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
AnimatedRotation(
|
|
|
|
|
turns: _deviceInfoExpanded ? 0.5 : 0,
|
|
|
|
|
duration: const Duration(milliseconds: 200),
|
|
|
|
|
child: const Icon(Icons.expand_more),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
AnimatedCrossFade(
|
|
|
|
|
firstChild: const SizedBox.shrink(),
|
|
|
|
|
secondChild: Padding(
|
|
|
|
|
padding: const EdgeInsets.fromLTRB(16, 0, 16, 16),
|
|
|
|
|
padding: const EdgeInsets.fromLTRB(16, 12, 16, 12),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
_buildInfoRow(
|
|
|
|
|
l10n.settings_infoName,
|
|
|
|
|
connector.deviceDisplayName,
|
|
|
|
|
),
|
|
|
|
|
_buildInfoRow(l10n.settings_infoName, connector.deviceDisplayName),
|
|
|
|
|
_buildInfoRow(l10n.settings_infoId, connector.deviceIdLabel),
|
|
|
|
|
_buildInfoRow(
|
|
|
|
|
l10n.settings_infoStatus,
|
|
|
|
|
@ -410,13 +371,6 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
crossFadeState: _deviceInfoExpanded
|
|
|
|
|
? CrossFadeState.showSecond
|
|
|
|
|
: CrossFadeState.showFirst,
|
|
|
|
|
duration: const Duration(milliseconds: 200),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|