This package helps you to showcase your project or play with Mobile OS interface for any kind of projects.
All the functions are ready include in the package such as:
- Window management system
- Customizable toast notifications
- OS-specific functionalities
Demo
See real examples:
Table of contents
Run this command:
With Flutter:
flutter pub add device_in
This will add a line like this to your package's pubspec.yaml with the latest version (and run an implicit flutter pub get):
dependencies:
device_in: <latest_version>
Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more about it.
Import the package in your code:
import 'package:device_in/device_in.dart';
You can use standard device_in like so :
DeviceIn(
device: Devices.ios.iPhone13ProMax,
deviceNavigationController: DeviceNavigationController(apps: [],
bottomApps: [],
),
),
Properties of DeviceApplication
| Property | Type | Default Value | Description |
|---|---|---|---|
| appName | String | Required | The name of the application |
| appNameStyle | TextStyle? | null | The style of the application name |
| iconImage | String? | null | The path to the icon of the application (supports asset path or URL) |
| iconImageWidget | Widget? | null | A custom widget for the application icon |
| appEntry | EntryWidgetBuilder? | null | The entry point widget of the application |
| onTap | Function()? | null | Callback function when the application is tapped |
| isBigWidget | bool | false | Whether the widget is displayed as a large widget |
Important notes:
- Either
iconImageoriconImageWidgetmust be provided, but not both. - Either
appEntryoronTapmust be provided, but not both. appNameis required.
Additional information:
EntryWidgetBuilderis defined as:typedef EntryWidgetBuilder = Widget Function(DeviceNavigationController controller);