Convert Figma logo to code with AI

flutter logopackages

A collection of useful packages maintained by the Flutter team

4,275
2,766
4,275
80

Top Related Projects

A framework for building native applications using React

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.

⚡ Empowering JavaScript with native platform APIs. ✨ Best of all worlds (TypeScript, Swift, Objective C, Kotlin, Java, Dart). Use what you love ❤️ Angular, Capacitor, Ionic, React, Solid, Svelte, Vue with: iOS (UIKit, SwiftUI), Android (View, Jetpack Compose), Dart (Flutter) and you name it compatible.

A framework for building native Windows apps with React.

33,519

An open-source framework for making universal native apps with React. Expo runs on Android, iOS, and the web.

Quick Overview

The flutter/packages repository on GitHub is a collection of various packages and libraries that are used in the development of Flutter applications. These packages provide a wide range of functionality, from UI components to data management and more, and are maintained by the Flutter team and the broader Flutter community.

Pros

  • Extensive Ecosystem: The flutter/packages repository offers a vast collection of packages, catering to a wide range of development needs for Flutter applications.
  • Community Contributions: Many of the packages are contributed by the Flutter community, ensuring a diverse and active ecosystem.
  • Maintained by Flutter Team: Packages maintained by the Flutter team are well-documented and actively supported.
  • Ease of Integration: Integrating these packages into a Flutter project is generally straightforward, thanks to the Flutter package management system.

Cons

  • Varying Quality: While the Flutter team maintains some packages, the quality and documentation of community-contributed packages can vary.
  • Potential Compatibility Issues: As the Flutter ecosystem evolves, some packages may not be kept up-to-date with the latest Flutter versions, leading to compatibility issues.
  • Dependency Management: Managing dependencies between multiple packages can sometimes be challenging, especially when dealing with version conflicts.
  • Limited Customization: Some packages may not provide the level of customization or flexibility required for specific project needs.

Code Examples

Since the flutter/packages repository contains a wide variety of packages, it's not feasible to provide code examples for all of them. However, here are a few examples of commonly used packages:

flutter_bloc

The flutter_bloc package is a state management solution that follows the Bloc (Business Logic Component) pattern. It helps manage the state of a Flutter application in a scalable and testable way.

// Defining a Bloc
class CounterBloc extends Bloc<CounterEvent, int> {
  CounterBloc() : super(0);

  @override
  Stream<int> mapEventToState(CounterEvent event) async* {
    if (event == CounterEvent.increment) {
      yield state + 1;
    } else if (event == CounterEvent.decrement) {
      yield state - 1;
    }
  }
}

// Using the Bloc in a Widget
class CounterPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return BlocProvider(
      create: (_) => CounterBloc(),
      child: BlocBuilder<CounterBloc, int>(
        builder: (context, count) {
          return Text('Count: $count');
        },
      ),
    );
  }
}

dio

The dio package is a powerful HTTP client for Dart, which can be used in both Flutter and server-side applications.

// Making a GET request
final dio = Dio();
final response = await dio.get('https://api.example.com/data');
print(response.data);

// Making a POST request with data
final data = {'name': 'John Doe', 'email': 'john@example.com'};
final response = await dio.post('https://api.example.com/users', data: data);
print(response.data);

provider

The provider package is a state management solution that uses the Provider pattern to manage the state of a Flutter application.

// Defining a ChangeNotifier
class CounterProvider extends ChangeNotifier {
  int _count = 0;
  int get count => _count;

  void increment() {
    _count++;
    notifyListeners();
  }

  void decrement() {
    _count--;
    notifyListeners();
  }
}

// Using the ChangeNotifier in a Widget
class CounterPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return ChangeNotifierProvider(
      create: (_) => CounterProvider(),
      child: Consumer<CounterProvider>(
        builder: (context, counterProvider, child) {
          return Text('Count: ${counterProvider.count}');
        },
      ),
    );
  }
}

Getting Started

To get started with the flutter/packages repository, you can follow these steps

Competitor Comparisons

A framework for building native applications using React

Pros of React Native

  • Larger ecosystem and community support
  • Better integration with native modules and third-party libraries
  • More mature and stable platform with longer track record

Cons of React Native

  • Steeper learning curve for developers new to React
  • Performance can be slower compared to Flutter, especially for complex UIs
  • More frequent breaking changes and updates required

Code Comparison

React Native:

import React from 'react';
import { View, Text } from 'react-native';

const App = () => (
  <View>
    <Text>Hello, React Native!</Text>
  </View>
);

Flutter:

import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Center(
          child: Text('Hello, Flutter!'),
        ),
      ),
    );
  }
}

Summary

React Native offers a more extensive ecosystem and better native integration, while Flutter provides better performance and a gentler learning curve. React Native uses JSX for UI components, whereas Flutter uses a widget-based approach with Dart. Both frameworks have their strengths and are suitable for different project requirements and developer preferences.

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.

Pros of Ionic Framework

  • Supports multiple frameworks (Angular, React, Vue) for greater flexibility
  • Extensive UI component library for rapid development
  • Strong focus on Progressive Web Apps (PWAs) and hybrid mobile apps

Cons of Ionic Framework

  • Performance can be slower compared to native solutions
  • Steeper learning curve for developers new to web technologies
  • Limited access to native device features without plugins

Code Comparison

Ionic Framework (TypeScript):

import { Component } from '@angular/core';
import { IonicModule } from '@ionic/angular';

@Component({
  selector: 'app-home',
  template: '<ion-button>Click me</ion-button>',
  standalone: true,
  imports: [IonicModule],
})
export class HomePage {}

Flutter Packages (Dart):

import 'package:flutter/material.dart';

class HomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return ElevatedButton(
      onPressed: () {},
      child: Text('Click me'),
    );
  }
}

The code comparison shows the basic structure for creating a button in both frameworks. Ionic Framework uses web technologies and Angular components, while Flutter Packages uses Dart and Flutter widgets. Flutter's approach is more concise and integrated with the Dart language, while Ionic leverages familiar web development patterns.

⚡ Empowering JavaScript with native platform APIs. ✨ Best of all worlds (TypeScript, Swift, Objective C, Kotlin, Java, Dart). Use what you love ❤️ Angular, Capacitor, Ionic, React, Solid, Svelte, Vue with: iOS (UIKit, SwiftUI), Android (View, Jetpack Compose), Dart (Flutter) and you name it compatible.

Pros of NativeScript

  • Direct access to native APIs without plugins
  • Ability to use existing JavaScript/TypeScript skills
  • Smaller app size compared to Flutter apps

Cons of NativeScript

  • Smaller community and ecosystem compared to Flutter
  • Less smooth animations and UI performance
  • Steeper learning curve for developers new to mobile development

Code Comparison

NativeScript (XML and TypeScript):

<Page>
  <StackLayout>
    <Label text="Hello, NativeScript!" />
    <Button text="Click Me" tap="{{ onTap }}" />
  </StackLayout>
</Page>
export function onTap() {
  console.log("Button tapped!");
}

Flutter (Dart):

import 'package:flutter/material.dart';

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              Text('Hello, Flutter!'),
              ElevatedButton(
                onPressed: () => print('Button tapped!'),
                child: Text('Click Me'),
              ),
            ],
          ),
        ),
      ),
    );
  }
}

Both frameworks offer cross-platform development capabilities, but Flutter provides a more unified development experience with its widget-based approach, while NativeScript offers closer integration with native platform APIs.

A framework for building native Windows apps with React.

Pros of react-native-windows

  • Native Windows UI components and APIs integration
  • Leverages existing React Native knowledge for Windows development
  • Supports both UWP and Win32 app development

Cons of react-native-windows

  • Limited to Windows platform, less cross-platform flexibility
  • Smaller community and ecosystem compared to Flutter
  • Steeper learning curve for developers new to React Native

Code Comparison

react-native-windows:

import { Button, Text, View } from 'react-native-windows';

const App = () => (
  <View>
    <Text>Hello, Windows!</Text>
    <Button title="Click me" onPress={() => console.log('Clicked')} />
  </View>
);

flutter/packages:

import 'package:flutter/material.dart';

void main() => runApp(MaterialApp(
  home: Scaffold(
    body: Center(child: Text('Hello, Flutter!')),
    floatingActionButton: FloatingActionButton(
      onPressed: () => print('Clicked'),
      child: Icon(Icons.add),
    ),
  ),
));

Summary

While react-native-windows offers native Windows integration and leverages existing React Native skills, it's limited to the Windows platform. flutter/packages provides a more cross-platform solution with a larger ecosystem but may require learning a new framework. The choice between the two depends on the specific project requirements and target platforms.

33,519

An open-source framework for making universal native apps with React. Expo runs on Android, iOS, and the web.

Pros of Expo

  • Simpler setup and configuration process
  • Extensive built-in APIs and services (e.g., push notifications, over-the-air updates)
  • Easier to get started for beginners in mobile app development

Cons of Expo

  • Less flexibility and customization options compared to Flutter
  • Larger app size due to included libraries and dependencies
  • Limited access to native modules without ejecting from the managed workflow

Code Comparison

Expo (React Native):

import React from 'react';
import { View, Text } from 'react-native';
import { Camera } from 'expo-camera';

export default function App() {
  return (
    <View>
      <Camera style={{ flex: 1 }} />
      <Text>Hello, Expo!</Text>
    </View>
  );
}

Flutter:

import 'package:flutter/material.dart';
import 'package:camera/camera.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Column(
          children: [
            CameraPreview(controller),
            Text('Hello, Flutter!'),
          ],
        ),
      ),
    );
  }
}

Both repositories offer tools for mobile app development, but Expo focuses on React Native while Flutter packages are specific to the Flutter framework. Expo provides a more streamlined experience for beginners, while Flutter offers greater customization and performance optimization possibilities.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Flutter Packages

Release Status Flutter CI Status

This repo is a companion repo to the main flutter repo. It contains the source code for Flutter's first-party packages (i.e., packages developed by the core Flutter team). Check the packages directory to see all packages.

These packages are also available on pub.

Issues

Please file any issues, bugs, or feature requests in the main flutter repo. Issues pertaining to this repository are labeled "package".

Contributing

If you wish to contribute a new package to the Flutter ecosystem, please see the documentation for developing packages. You can store your package source code in any GitHub repository (the present repo is only intended for packages developed by the core Flutter team). Once your package is ready you can publish to the pub repository.

If you wish to contribute a change to any of the existing packages in this repo, please review our contribution guide, and send a pull request.

Packages

These are the packages hosted in this repository:

PackagePubPointsPopularityIssuesPull requests
animationspub packagepub pointspopularityGitHub issues by-labelGitHub pull requests by-label
camerapub packagepub pointspopularityGitHub issues by-labelGitHub pull requests by-label
cross_filepub packagepub pointspopularityGitHub issues by-labelGitHub pull requests by-label
css_colorspub packagepub pointspopularityGitHub issues by-labelGitHub pull requests by-label
cupertino_iconspub packagepub pointspopularityGitHub issues by-labelGitHub pull requests by-label
espressopub packagepub pointspopularityGitHub issues by-labelGitHub pull requests by-label
extension_google_sign_in_as_googleapis_authpub packagepub pointspopularityGitHub issues by-labelGitHub pull requests by-label
file_selectorpub packagepub pointspopularityGitHub issues by-labelGitHub pull requests by-label
flutter_adaptive_scaffoldpub packagepub pointspopularityGitHub issues by-labelGitHub pull requests by-label
flutter_imagepub packagepub pointspopularityGitHub issues by-labelGitHub pull requests by-label
flutter_lintspub packagepub pointspopularityGitHub issues by-labelGitHub pull requests by-label
flutter_markdownpub packagepub pointspopularityGitHub issues by-labelGitHub pull requests by-label
flutter_plugin_android_lifecyclepub packagepub pointspopularityGitHub issues by-labelGitHub pull requests by-label
flutter_template_imagespub packagepub pointspopularityGitHub issues by-labelGitHub pull requests by-label
go_routerpub packagepub pointspopularityGitHub issues by-labelGitHub pull requests by-label
go_router_builderpub packagepub pointspopularityGitHub issues by-labelGitHub pull requests by-label
google_maps_flutterpub packagepub pointspopularityGitHub issues by-labelGitHub pull requests by-label
google_sign_inpub packagepub pointspopularityGitHub issues by-labelGitHub pull requests by-label
image_pickerpub packagepub pointspopularityGitHub issues by-labelGitHub pull requests by-label
interactive_media_adspub packagepub pointspopularityGitHub issues by-labelGitHub pull requests by-label
in_app_purchasepub packagepub pointspopularityGitHub issues by-labelGitHub pull requests by-label
ios_platform_imagespub packagepub pointspopularityGitHub issues by-labelGitHub pull requests by-label
local_authpub packagepub pointspopularityGitHub issues by-labelGitHub pull requests by-label
metrics_centerpub packagepub pointspopularityGitHub issues by-labelGitHub pull requests by-label
multicast_dnspub packagepub pointspopularityGitHub issues by-labelGitHub pull requests by-label
palette_generatorpub packagepub pointspopularityGitHub issues by-labelGitHub pull requests by-label
path_providerpub packagepub pointspopularityGitHub issues by-labelGitHub pull requests by-label
pigeonpub packagepub pointspopularityGitHub issues by-labelGitHub pull requests by-label
pointer_interceptorpub packagepub pointspopularityGitHub issues by-labelGitHub pull requests by-label
plugin_platform_interfacepub packagepub pointspopularityGitHub issues by-labelGitHub pull requests by-label
processpub packagepub pointspopularityGitHub issues by-labelGitHub pull requests by-label
quick_actionspub packagepub pointspopularityGitHub issues by-labelGitHub pull requests by-label
google_identity_services_webpub packagepub pointspopularityGitHub issues by-labelGitHub pull requests by-label
rfwpub packagepub pointspopularityGitHub issues by-labelGitHub pull requests by-label
shared_preferencespub packagepub pointspopularityGitHub issues by-labelGitHub pull requests by-label
standard_message_codecpub packagepub pointspopularityGitHub issues by-labelGitHub pull requests by-label
two_dimensional_scrollablespub packagepub pointspopularityGitHub issues by-labelGitHub pull requests by-label
url_launcherpub packagepub pointspopularityGitHub issues by-labelGitHub pull requests by-label
video_playerpub packagepub pointspopularityGitHub issues by-labelGitHub pull requests by-label
web_benchmarkspub packagepub pointspopularityGitHub issues by-labelGitHub pull requests by-label
webview_flutterpub packagepub pointspopularityGitHub issues by-labelGitHub pull requests by-label
xdg_directoriespub packagepub pointspopularityGitHub issues by-labelGitHub pull requests by-label