You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansu_ui/example/lib/component/example_scaffold.dart

33 lines
823 B

import 'package:ansu_ui/scaffold/as_scaffold.dart';
import 'package:example/common/code_view.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
class ExampleScaffold extends StatelessWidget {
final String title;
final CodeBuilder? text;
final List<Widget> children;
const ExampleScaffold({
Key? key,
required this.title,
this.text,
required this.children,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return ASScaffold(
title: title,
actions: [
text == null
? SizedBox()
: IconButton(
icon: Icon(Icons.code, color: Colors.black54),
onPressed: () => Get.to(CodeView(text: text)),
),
],
body: ListView(children: children),
);
}
}