Files
reverse_nn/lib/ui/layouts/application_layout.dart
2024-12-16 00:38:18 +03:00

27 lines
812 B
Dart
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:reverse_nn/application/controllers/application_controller.dart';
class ApplicationLayout extends StatelessWidget {
final Widget body;
const ApplicationLayout({super.key, required this.body});
@override
Widget build(BuildContext context) {
final ApplicationController applicationController = Get.put(ApplicationController());
return Scaffold(
appBar: AppBar(
backgroundColor: Theme.of(context).colorScheme.inversePrimary,
title: const Text('Реверс НН'),
actions: [
IconButton(icon: Icon(
applicationController.getThemeIcon()),
onPressed: applicationController.toggleTheme
),
],
),
body: body,
);
}
}