Skip to content

Instantly share code, notes, and snippets.

@velotiotech
Created July 6, 2022 07:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save velotiotech/8ac0068aa1a04f88443325997aa6418a to your computer and use it in GitHub Desktop.
Save velotiotech/8ac0068aa1a04f88443325997aa6418a to your computer and use it in GitHub Desktop.
import 'package:get/get.dart';
class CounterManager extends GetLifeCycle {
final RxInt count = RxInt(0);
int get getCounter => count.value;
void increment() => count.value = count.value + 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment