The iphone
package allow you to display an iphone really easily for your website UI and showcase your application, wallpaper really easy!
- Displayn iPhone on web for portfolio
- Choose color of iPhone
- Choose the application you wanna display
Click here: Pub dev
Add the following dependency to your pubspec.yaml file:
dependencies:
iphone: ^0.0.1
Then, run flutter pub get
to fetch the package.
- import the iphone package:
import 'package:iphone/iphone.dart';
3 colors are currently implemented for the iPhone 14: dark, purple, yellow
iphoneColor: ColorIPhone.dark,
stock in assets
folder your wallpaper image and dipslay it on your iphone easily
wallpaper: "assets/wallpaper.jpg",
you can easily display your application on your iphone using a kind of json format where you can place the name of the app, the path of the logo stock in assets
folder
applications: [
{
"name": "Instagram",
"iconAssets": "assets/icons/instagram.jpg",
"onPressed": () {
// do something like a true onPressed such as route to other page...
},
},
{
"name": "Facebook",
"iconAssets": "assets/icons/facebook.png",
"onPressed": () async {
// do something like a true onPressed such as route to other page...
},
}
]
Same things as basic Apps but display max 4 apps, those are the most important !
bottomApplications: [
{
"name": "Safari",
"iconAssets": "assets/icons/safari.jpg",
"onPressed": () {
// do something like a true onPressed such as route to other page...
},
},
{
"name": "AppStore",
"iconAssets": "assets/icons/appstore.png",
"onPressed": () async {
// do something like a true onPressed such as route to other page...
},
}
]
The project is only at the beginning, there are still a lot of type of phone to add only iPhone 14 are implemented ❤️