This is a modified fork of shadcn_flutter and includes resources & merged code from Phosphor Icons & Ionicons. It is designed for quickly creating apps.

Forked / Modified Packages

  • shadcn_flutter for general widgets & overall UI. Their license is included in the lib/shadcn folder.
  • phosphor_flutter & ionicons for icons
  • blurme for blur effects (needed to modify) license unneeded as it says "Use however you want".

Initial Setup

Note: This guide below only showcases new features & changes. Please refer to shadcn_flutter docs to see how to use that package through arcane.

main.dart

void main() => runApp(MyApp());


class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) => ArcaneApp(
      theme: ArcaneTheme(scheme: ColorSchemes.zinc()),
      home: HomeScreen()
  );
}

pubspec.yaml

dependencies: 
    arcane: VERSION
flutter:
  uses-material-design: true
  fonts:
    - family: "GeistSans"
      fonts:
        - asset: "packages/arcane/resources/fonts/Geist-Black.otf"
          weight: 800
        - asset: "packages/arcane/resources/fonts/Geist-Bold.otf"
          weight: 700
        - asset: "packages/arcane/resources/fonts/Geist-Light.otf"
          weight: 300
        - asset: "packages/arcane/resources/fonts/Geist-Medium.otf"
          weight: 500
        - asset: "packages/arcane/resources/fonts/Geist-SemiBold.otf"
          weight: 600
        - asset: "packages/arcane/resources/fonts/Geist-Thin.otf"
          weight: 100
        - asset: "packages/arcane/resources/fonts/Geist-UltraBlack.otf"
          weight: 900
        - asset: "packages/arcane/resources/fonts/Geist-UltraLight.otf"
          weight: 200
        - asset: "packages/arcane/resources/fonts/Geist-Regular.otf"
          weight: 400
    - family: "GeistMono"
      fonts:
        - asset: "packages/arcane/resources/fonts/GeistMono-Black.otf"
          weight: 800
        - asset: "packages/arcane/resources/fonts/GeistMono-Bold.otf"
          weight: 700
        - asset: "packages/arcane/resources/fonts/GeistMono-Light.otf"
          weight: 300
        - asset: "packages/arcane/resources/fonts/GeistMono-Medium.otf"
          weight: 500
        - asset: "packages/arcane/resources/fonts/GeistMono-Regular.otf"
          weight: 400
        - asset: "packages/arcane/resources/fonts/GeistMono-SemiBold.otf"
          weight: 600
        - asset: "packages/arcane/resources/fonts/GeistMono-Thin.otf"
          weight: 100
        - asset: "packages/arcane/resources/fonts/GeistMono-UltraBlack.otf"
          weight: 900
        - asset: "packages/arcane/resources/fonts/GeistMono-UltraLight.otf"
          weight: 200

Screens

class HomeScreen extends StatelessWidget {
  const HomeScreen({super.key});

  @override
  Widget build(BuildContext context) => Screen(
    header: Bar(titleText: "Home"),
    slivers: [
      // It is ideal to use slivers in screens
    ]
  );
}

Sectioned Lists

Sectioned lists allow each section to contain sticky headers.

Screen(
    header: Bar(titleText: "Home"),
    slivers: [
      // Bar section is a bar header with a sliver content
      // Bar sections are slivers as they have sticky headers
      BarSection(
        titleText: "Header Title",
        sliver: SliverList(...)
      ),

      // You can also make your own custom header instead of bars
      GlassSection(
        header: Text("Header Title"),
        sliver: SliverList(...)
      )
    ]
)

You can also nest sections inside of sections

Screen(
    header: Bar(titleText: "Home"),
    slivers: [
      BarSection(
          titleText: "Outer Section",
          sliver: MultiSliver(children: [
              // The outer section + inner section 
              // will stack their headers on top of each other
              BarSection(
                  titleText: "Inner Section",
                  sliver: SliverList(...)
              ),
          ])    
      ),
      BarSection(
          titleText: "Inner Section",
          sliver: SliverList(...)
      ),
    ]
)

Tiles

List tiles similar to material.

Tile(
    title: Text("Title"),
    subtitle: Text("Subtitle"),
    leading: Icon(Icons.ac_unit),
    trailing: Icon(Icons.ac_unit),
    onTap: () => print("Tapped")
)
SwitchTile(
    title: Text("Checkbox Tile"),
    leading: Icon(Icons.plus),
    subtitle: Text("Subtitle"),
    value: true,
)
CheckboxTile(
    title: Text("Checkbox Tile"),
    leading: Icon(Icons.plus),
    trailing: Icon(Icons.x),
    subtitle: Text("But with a trailing widget"),
    value: true,
)

Quick access to shadcn popup menus & modified context menus

PopupMenu(
    icon: Icons.dots_3,
    items: [
        MenuButton(child: Text("Click Me"), onTap: (_) => print("Clicked")),
        MenuButton(child: Text("Hover Me"), subMenu: [
            // more menu items
        ]),  
    ]
)

Dialogs

Fast dialog access, compatible with Pylon

=> DialogConfirm(
    title: "Are you sure?",
    description: "This action cannot be undone",
    onConfirm: () => print("Confirmed"),
    confirmText: "Delete Forever",
).open(context);
=> DialogText(
    title: "Input Dialog",
    description: "This is a text description",
    confirmText: "Yes",
    cancelText: "Nope",
    onConfirm: (x) => print("Input $x"),
).open(context)

Toast

Compatible with Pylon

TextToast("This is a toast").open(context);
=> Toast(
    builder: (context) => const Text("Bottom Left"),
).open(context);

Sheets

Compatible with Pylon

Sheet(builder: (context) => const TheScreen()).open(context)

Libraries

arcane
component/adaptive
component/app
component/bar
component/bottom_navigation_bar
component/center_body
component/checkbox
component/dialog/command
component/dialog/confirm
component/dialog/confirm_text
component/dialog/dialog
component/dialog/email
component/dialog/text
component/fab
component/glass
component/gutter
component/icons
component/image
component/radio_cards
component/screen/abstract_screen
component/screen/fill_screen
component/screen/settings_screen
component/screen/sliver_screen
component/section
component/selector
component/sheet
component/tile
component/toast
shadcn/animation
shadcn/components/animation
shadcn/components/chart/tracker
shadcn/components/control/button
shadcn/components/control/clickable
shadcn/components/control/command
shadcn/components/control/hover
shadcn/components/control/scrollbar
shadcn/components/control/scrollview
shadcn/components/debug
shadcn/components/display/avatar
shadcn/components/display/badge
shadcn/components/display/calendar
shadcn/components/display/chip
shadcn/components/display/circular_progress_indicator
shadcn/components/display/code_snippet
shadcn/components/display/divider
shadcn/components/display/dot_indicator
shadcn/components/display/keyboard_shortcut
shadcn/components/display/linear_progress_indicator
shadcn/components/display/number_ticker
shadcn/components/display/progress
shadcn/components/display/skeleton
shadcn/components/display/spinner
shadcn/components/form/autocomplete
shadcn/components/form/checkbox
shadcn/components/form/chip_input
shadcn/components/form/color_picker
shadcn/components/form/date_picker
shadcn/components/form/file_input
shadcn/components/form/file_picker
shadcn/components/form/form
shadcn/components/form/form_field
shadcn/components/form/image
shadcn/components/form/input_otp
shadcn/components/form/number_input
shadcn/components/form/phone_input
shadcn/components/form/radio_group
shadcn/components/form/select
shadcn/components/form/slider
shadcn/components/form/sortable
shadcn/components/form/star_rating
shadcn/components/form/switch
shadcn/components/form/text_area
shadcn/components/form/text_field
shadcn/components/form/time_picker
shadcn/components/icon/icon
shadcn/components/icon/triple_dots
shadcn/components/layout/accordion
shadcn/components/layout/alert
shadcn/components/layout/basic
shadcn/components/layout/card
shadcn/components/layout/card_image
shadcn/components/layout/collapsible
shadcn/components/layout/dialog/alert_dialog
shadcn/components/layout/focus_outline
shadcn/components/layout/media_query
shadcn/components/layout/outlined_container
shadcn/components/layout/overflow_marquee
shadcn/components/layout/pixel_snapped_gap
shadcn/components/layout/resizable
shadcn/components/layout/scaffold
shadcn/components/layout/stage_container
shadcn/components/layout/stepper
shadcn/components/layout/steps
shadcn/components/layout/timeline
shadcn/components/layout/tree
shadcn/components/locale/shadcn_localizations
shadcn/components/menu/context_menu
shadcn/components/navigation/pagination
shadcn/components/navigation/tab_list
shadcn/components/navigation/tabs
shadcn/components/overlay/dialog
shadcn/components/overlay/drawer
shadcn/components/overlay/hover_card
shadcn/components/overlay/popover
shadcn/components/overlay/refresh_trigger
shadcn/components/overlay/toast
shadcn/components/overlay/tooltip
shadcn/components/text/selectable
shadcn/components/text/text
shadcn/components/text/underline_text
shadcn/data
shadcn/shadcn_app
shadcn/theme/color_scheme
shadcn/theme/generated_colors
shadcn/theme/generated_themes
shadcn/theme/theme
shadcn/theme/typography
shadcn/util
util/blur
util/extensions
util/sliver
util/theme