pwa_material_app 1.0.0
pwa_material_app: ^1.0.0 copied to clipboard
PWA Material App is a Flutter web application that uses the Material Design system and Progressive Web App (PWA) features.
PWA Material App #
PWA Material App is a Flutter web application that uses the Material Design system and Progressive Web App (PWA) features.
Features #
- Lightweight and easy to use
- Realtime rendering PWA (no need to refresh the page if resolution changes)
- Automatically detects the device resolution and adjusts the layout accordingly
- Auto responsive design
Installation #
Add this to your package's pubspec.yaml file and then run pub get:
dependencies:
pwa_material_app:
git: https://github.com/ArZHa03/pwa_material_app.git
Usage & Example #
Here is a simple example of how to use the PWAMaterialApp in your Flutter web application:
import 'package:flutter/material.dart';
import 'package:pwa_material_app/pwa_material_app.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return PWAMaterialApp(
title: 'PWA Material App',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: MyHomePage(),
);
}
}
class MyHomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('PWA Material App'),
),
body: Center(
child: Text('Hello, PWA!'),
),
);
}
}
Additional Information #
You can use or customize the PWAMaterialApp widget to suit your needs. The PWAMaterialApp like using MaterialApp but with 3 parameters added:
pwaColor- The background color of the PWA (if enabled).pwaMaxWidth- The maximum width of the PWA (if enabled).pwaEnable- Whether to enable the PWA features or not. If set to false, the app will behave like a normal Flutter web app without PWA features.