device_in 1.0.1
device_in: ^1.0.1 copied to clipboard
device_in helps you to showcase your project or play with Mobile OS interface for any kind of projects.
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
copied to clipboard
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>
copied to clipboard
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';
copied to clipboard
You can use standard device_in like so :
DeviceIn(
device: Devices.ios.iPhone13ProMax,
deviceNavigationController: DeviceNavigationController(apps: [],
bottomApps: [],
),
),
copied to clipboard
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
iconImage
oriconImageWidget
must be provided, but not both. - Either
appEntry
oronTap
must be provided, but not both. appName
is required.
Additional information:
EntryWidgetBuilder
is defined as:typedef EntryWidgetBuilder = Widget Function(DeviceNavigationController controller);
copied to clipboard