import 'package:flutter/material.dart'; class MainLayout extends StatelessWidget { final Widget body; final String title; final Widget drawer; const MainLayout({ super.key, required this.body, required this.title, required this.drawer, }); static const Color mainColor = Colors.blue; @override Widget build(BuildContext context) { return Scaffold( backgroundColor: Colors.white, // Drawer sekarang fleksibel drawer: drawer, // ================= APPBAR ================= appBar: AppBar( backgroundColor: mainColor, elevation: 0, title: Text( title, style: const TextStyle(color: Colors.white), ), iconTheme: const IconThemeData( color: Colors.white, size: 28, ), ), // ================= BODY ================= body: body, ); } }