flartdart 1.2.0
flartdart: ^1.2.0 copied to clipboard
A comprehensive Flutter-inspired UI framework for Dart Web applications with 100+ widgets, animations, forms, and media support.
Flart π¨ #
A high-performance, Flutter-inspired UI framework for pure Dart Web applications.
Build stunning, responsive, and interactive web applications using the familiar declarative syntax of Flutterβall in 100% pure Dart. Flart bridges the gap between the power of web technologies (HTML/CSS/JS) and the developer experience of Flutter.
π Why Flart? #
- π― Flutter-Native Syntax: If you know Flutter, you know Flart. Use
Row,Column,Container,Scaffold, andStatefulWidgetjust like you do in Flutter. - ποΈ 100+ Pre-built Widgets: From basic layout components to complex pickers, media players, and animated transitions.
- βοΈ Zero External Dependencies: A lightweight core built on top of standard web APIs.
- π οΈ Integrated CLI: Generate project templates instantly with the
flartdartcommand. - π¨ Infinite Styling: Native support for
BoxDecoration,TextStyle, and a uniquerawCssproperty for surgical style overrides. - β‘ Performance First: Lightweight HTML/CSS rendering with optimized DOM updates.
- π± Responsive by Design: Built-in
MediaQueryand flexible layout widgets for seamless mobile & desktop support.
π οΈ CLI Tool #
The fastest way to get started is by using the Flartdart CLI.
Installation #
dart pub global activate flartdart
Usage #
# Create a new project
flartdart create my_awesome_app
# Run your app
cd my_awesome_app
dart pub get
dart run build_runner serve
π¦ Installation #
Add flartdart to your pubspec.yaml:
dependencies:
flartdart: ^1.0.0
Then, fetch the dependencies:
dart pub get
π¬ Quick Start #
The Classic "Hello World" #
import 'package:flartdart/flartdart.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp();
@override
Widget build(BuildContext context) {
return FDMaterialApp(
title: 'My First Flart App',
home: FDScaffold(
appBar: FDAppBar(
title: FDText('Hello Flart!'),
backgroundColor: FlartColors.blue,
),
body: FDCenter(
child: FDColumn(
mainAxisAlignment: AxisAlignment.center,
children: [
FDContainer(
padding: EdgeInsets.all(20),
decoration: BoxDecoration(
color: FlartColors.blueGrey,
borderRadius: BorderRadius.circular(12),
boxShadow: [
BoxShadow(color: '#00000033', blurRadius: 10)
],
),
child: FDText(
'Welcome to the future of Dart Web π',
style: TextStyle(color: FlartColors.white, fontSize: 20),
),
),
FDSizedBox(height: 24),
FDElevatedButton(
onPressed: () => print('Let\'s build something!'),
child: FDText('Get Started'),
),
],
),
),
),
);
}
}
π§© Comprehensive Widget Ecosystem #
Flart is divided into logical categories to help you build everything from simple blogs to complex dashboards.
ποΈ Structure & Layout #
FDScaffold,FDAppBar,FDDrawer,FDBottomNavigationBarFDContainer,FDCard,FDColumn,FDRow,FDStack,FDWrapFDListView,FDGridView,FDSingleChildScrollView
βοΈ Text & Typography #
FDText,FDRichText,FDTextSpan,FDLinkText,FDSelectableText
π±οΈ Buttons & Interaction #
FDElevatedButton,FDTextButton,FDIconButton,FDGestureDetector
π Forms & Inputs #
FDTextField,FDTextFormField,TextArea,FDCheckbox,FDSwitch,FDSliderAutocompleteField,ColorPicker,FileUpload
π Pickers #
FDDatePicker,FDTimePicker,FDDateRangePicker,FDMonthPicker,FDWeekPicker,DateTimePicker
π¬ Animations & Effects #
AnimatedContainer,AnimatedOpacity,AnimatedScale,AnimatedRotation,FadeInAnimationController,Tween,Curves
π₯ Media & Painting #
VideoPlayer,AudioPlayer,YouTubePlayer,MapEmbedFDCustomPaint,FDSvgPicture
ποΈ Architecture: The Bridge #
Flart works by transpiling Dart widget structures into highly optimized HTML, CSS, and interactive JavaScript.
- Declaration: You define your UI in Dart using a nested widget tree.
- Rendering: Each widget implements a
render()method that returns a string of HTML/CSS. - Interactivity: Event callbacks (like
onPressed) are managed via aCallbackManagerthat bridges JavaScript events back into Dart logic. - State:
StatefulWidgetprovides a familiar lifecycle (initState,setState,dispose) for managing dynamic data.
π Resource Links #
- π Detailed Widget Guide: Exhaustive reference with code samples for every widget.
- π€ Contributing: Learn how to help us improve Flart.
- π Example Projects: Real-world implementations and demos.
- π Changelog: Stay updated with the latest releases.
π€ Contributing #
We love contributions! Whether it's fixing a bug, adding a new widget, or improving the documentation, your help is welcome. Please check out our Contributing Guidelines.
π License #
Flart is open-source software licensed under the MIT License. See the LICENSE file for more information.
Built with β€οΈ for the Dart Community