refactor(mobile): widgets (#9291)

* refactor(mobile): widgets

* update
This commit is contained in:
Alex 2024-05-06 23:04:21 -05:00 committed by GitHub
parent 7520ffd6c3
commit 5806a3ce25
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
203 changed files with 318 additions and 318 deletions

View file

@ -0,0 +1,30 @@
import 'package:flutter/material.dart';
class SettingsSubPageScaffold extends StatelessWidget {
final List<Widget> settings;
final bool showDivider;
const SettingsSubPageScaffold({
super.key,
required this.settings,
this.showDivider = false,
});
@override
Widget build(BuildContext context) {
return ListView.separated(
padding: const EdgeInsets.symmetric(vertical: 20),
itemCount: settings.length,
itemBuilder: (ctx, index) => settings[index],
separatorBuilder: (context, index) => showDivider
? const Column(
children: [
SizedBox(height: 5),
Divider(height: 10, indent: 15, endIndent: 15),
SizedBox(height: 15),
],
)
: const SizedBox(height: 10),
);
}
}