first commit

This commit is contained in:
2025-03-03 20:59:42 +03:00
commit 273e68557a
1099 changed files with 17880 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
// Flutter imports:
import 'package:flutter/material.dart';
///
/// Виджет условной отрисовки
///
class Wif extends StatelessWidget {
/// Условие по которому будет происходить отрисовка
final bool condition;
/// Построение содержимого
final WidgetBuilder builder;
/// Виджет если условие не удовлетворительно
final WidgetBuilder? fallback;
///
/// Виджет условной отрисовки
///
const Wif({
required this.condition,
required this.builder,
this.fallback,
super.key,
});
@override
Widget build(BuildContext context) {
return condition
? builder(context)
: fallback != null
? fallback!(context)
: const Offstage();
}
}