Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flutter alien signals #9

Merged
merged 9 commits into from
Jan 7, 2025
Merged

Flutter alien signals #9

merged 9 commits into from
Jan 7, 2025

Conversation

medz
Copy link
Owner

@medz medz commented Jan 7, 2025

Alien Signals on pub.dev

Installation

To install Alien Signals, add the following to your pubspec.yaml:

dependencies:
  flutter_alien_signals: latest

Alternatively, you can run the following command:

flutter pub add flutter_alien_signals

Example

class Counter extends SignalsWidget {
  const Counter({super.key});

  @override
  Widget build(BuildContext context) {
    final count = signal(0);
    void increment() => count.value++;

    return Scaffold(
      body: Center(
        child: Text('Count: ${count.get()}'),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: increment,
        child: const Icon(Icons.plus_one),
      ),
    );
  }
}

@medz medz merged commit 58ba71e into main Jan 7, 2025
1 check passed
@medz medz deleted the flutter_alien_signals branch January 7, 2025 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant