responsive_notebook_background 0.1.3 responsive_notebook_background: ^0.1.3 copied to clipboard
A notebook background which is responsive to the system text size settings.
import 'package:flutter/material.dart';
import 'package:responsive_notebook_background_example/pages/custom.dart';
import 'package:responsive_notebook_background_example/pages/grid.dart';
import 'package:responsive_notebook_background_example/pages/lined.dart';
import 'package:responsive_notebook_background_example/theme.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'ResponsiveNotebookBackground demo',
theme: CustomTheme.theme(context),
home: const _Home(),
);
}
}
class _Home extends StatelessWidget {
const _Home({
Key? key,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return DefaultTabController(
length: 3,
child: Scaffold(
appBar: AppBar(
title: const Text('NotebookBackground'),
bottom: const TabBar(
isScrollable: true,
tabs: [
Tab(
text: 'Lined',
),
Tab(
text: 'Grid',
),
Tab(
text: 'Custom',
),
],
),
),
body: const SafeArea(
child: TabBarView(
physics: NeverScrollableScrollPhysics(),
children: [
ExampleLined(),
ExampleGrid(),
ExampleCustom(),
],
),
),
bottomNavigationBar: BottomAppBar(
color: Theme.of(context).colorScheme.primary,
child: const SizedBox.shrink(),
),
),
);
}
}