circus_ring 1.0.0+1 copy "circus_ring: ^1.0.0+1" to clipboard
circus_ring: ^1.0.0+1 copied to clipboard

CircusRing is a lightweight, dependency injection container for Flutter with simple, flexible, and type-safe dependency management.

example/example.md

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

void main() {
  runApp(const MyApp());
}

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

  @override
  Widget build(BuildContext context) {
    Ring.hire('This is Example');

    return MaterialApp(
      title: 'CircusRing Example',
      theme: ThemeData(
        primarySwatch: Colors.blue,
        useMaterial3: true,
      ),
      home: const ExampleScreen(),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    final example = Ring.find<String>();

    return Scaffold(
      body: Center(
        child: Text(
          example,
          style: TextStyle(fontSize: 24),
        ),
      ),
    );
  }
}
2
likes
160
points
6
downloads

Publisher

unverified uploader

Weekly Downloads

CircusRing is a lightweight, dependency injection container for Flutter with simple, flexible, and type-safe dependency management.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on circus_ring