搜索插件、代码仓与 APP 分类

插件详情v0.1.0

flutter_showcase

一种快速、简单且酷炫的方式,将你的 Flutter 项目分享给世界。

近 30 天下载
73
喜欢数
65
Pub 分数
35

安装插件

flutter pub add flutter_showcase

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

Flutter Showcase 是一个轻量级包,旨在快速轻松地与他人分享 Flutter 项目。它使开发者能够生成可交互、可嵌入的应用程序预览,从而无需用户克隆或构建项目即可简单演示功能。非常适合在网站、作品集或文档中展示,支持实时交互和视觉反馈。该包可无缝集成到现有的 Flutter 工作流中,并强调速度和简洁性。

适合场景

  • 在线分享应用演示
  • 展示作品集中的项目
  • 在文档中展示UI/UX
  • 在演示中展示应用程序
  • 快速生成交互式预览

主要特点

  • 与 Flutter 的轻松集成
  • 交互式应用预览
  • 快速设置和部署
  • 可嵌入的网页视图
  • 所需配置最少

适合对象

  • 开发者共享项目
  • UI/UX 设计师
  • 开源贡献者
  • 教育工作者演示应用程序
  • 投资组合构建器

使用建议

  • 仅限基于网页的预览
  • 无离线模式
  • 需要互联网访问以进行实时演示
  • 不适用于生产应用
  • 可能需要额外的样式来实现自定义展示

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

Flutter Showcase

A simple, fast and easy way to share you flutter project or mockups with the world. Demo

Intro

Flutter Showcase is a project that helps you share flutter your project online. While building your project as a website is enough, this package aims to empower your demo. You can can have different appareances, actionable links and social metadata.

Flutter Showcase is only displayed when building the web project. When compiling to other platforms your project will still look as before.

Right now there is only SimpleTemplate but the goal is to provide multiple options to share your project so you can choose the one that fits for you.

Check the web demo with the awesome vignettes from @gskinnerTeam

Getting Started

  1. Install package Check last version

  2. Wrap your app around a Showcase widget

runApp(Showcase(
  title: 'My Awesome Project',
  description: 'Hello World! Welcome to my awesome Flutter Project',
  app: MyApp()
))
  1. Add the frame builder inside Material App
MaterialApp(
  ....
  builder: Frame.builder,
  ....
)

Why is this needed? This builder is used to set new MediaQuery params with mobile size

  1. Run Flutter build web

  2. Publish the web project: See this cool articles on how to publish your app

That easy? Yess!!!

Keep reading for more detailed features

Customize my showcase

  1. Choose the template you perfer from the class Templates.

  2. Add actianable links

Showcase(
  // Add LinkData.github, LinkData.pub or create your custom LinkData()
  links: [
    LinkData.github(
      'https://github.com/jamesblasco/flutter_showcase'),
    LinkData.pub(
    'https://github.com/jamesblasco/flutter_showcase')
  ],
  //Add your brand logo next to the Flutter logo
  logoLink: LinkData(
      icon: Image.asset('assets/jaime_logo.png',
          fit: BoxFit.fitHeight),
      url: 'https://github.com/jamesblasco')
)      
  1. Create your custom theme
Showcase(
  theme : TemplateThemeData(
    brightness: Brightness.dark,
    backgroundColor: Colors.black,
    titleTextStyle: TextStyle(
      fontFamily: 'WorkSans',
      fontWeight: FontWeight.bold,
      color: Colors.white,
      height: 1.1,
      letterSpacing: 5),
    descriptionTextStyle: TextStyle(
        fontFamily: 'WorkSans',
        color: Colors.white70,
        fontWeight: FontWeight.w400,
        letterSpacing: 2),  
    flutterLogoColor: FlutterLogoColor.white,
    frameTheme: FrameThemeData(
      frameColor: Colors.white,
      statusBarBrightness: Brightness.dark,
    ),    
    buttonTheme: ButtonThemeData(
      buttonColor: Colors.white,
      shape:
          RoundedRectangleBorder(borderRadius: BorderRadius.circular(50)),
      textTheme: ButtonTextTheme.accent,
      padding: EdgeInsets.all(16),
    ),
    buttonTextStyle: TextStyle(
        fontFamily: 'WorkSans',
        color: Colors.black,
        fontWeight: FontWeight.bold,
        letterSpacing: 2),
    buttonIconTheme: IconThemeData(color: Colors.black) 
  ),
)  

Current package problems

  • Flutter web is still limited, some features are not available and performance can be a bit low sometimes
  • While most of the ui packages work on web, there are some packages that won't work or will not allow to compile the app
  • Creating a mobile frame inside a Flutter web app makes the global positions from gestures to be a reference for the whole screen and not the framed app, this might cause problems if you are using globalPosition in any GestureDetector or more advanced Widgets

Autogenerate social media tags - Experimental

CAUTION! This feature is still experimental; It generates a new index.html, if you add your own js scrips (as Firebase) it won't work for now.

This projects aims to generate social media tags title, description, url and image for your Flutter project so you don't have to do it.

  1. A WebDriver is needed for making a screenshot of the project For the experimental version I am using ChromeDriver.

Github Actions have ChromeDriver installed by default 🎉 Local instalation:

  • Mac users with Homebrew installed: brew tap homebrew/cask && brew cask install chromedriver
  • Debian based Linux distros: sudo apt-get install chromium-chromedriver
  • Windows users with Chocolatey installed: choco install chromedriver

See here for installing manually

  1. Add this at the bottom of your pubspec.yaml
showcase:
  title: Your project name
  description: This is the description of your project
  url: https://showcase-custom-web.com
  1. Instead of flutter build web we will use flutter pub run flutter_showcase build that will generate the web project in the folder in build/web_showcase

所属分类

依赖

依赖清单 9 项

源码仓库

使用此插件的项目

暂无相关数据。