In order to support all of Drifts features, we would nedd a TON of decorators. I thinkg typed_sql get's away with this becuase they have a much smaller feature set
class Group extends Row {
@AutoIncrementPrimaryKey()
int get id;
import 'package:flutter/material.dart'; | |
import 'package:flutter/cupertino.dart'; | |
void main() { | |
runApp(const MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
const MyApp({super.key}); |
import "package:rxdart/rxdart.dart"; | |
void main() async { | |
// Emit an incrementing number every 5 seconds | |
final parentStream = Stream.periodic(Duration(seconds: 5), (i) => i); | |
/// Every second, emit an incrementing number which is multipled by the current parentStream | |
final childStream = parentStream.asyncMap((multiplyBy) { | |
return Stream.periodic(Duration(seconds: 1), (i) => i * multiplyBy); | |
}); |
In order to support all of Drifts features, we would nedd a TON of decorators. I thinkg typed_sql get's away with this becuase they have a much smaller feature set
class Group extends Row {
@AutoIncrementPrimaryKey()
int get id;
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(const MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
const MyApp({super.key}); | |
// This widget is the root of your application. |
import "package:riverpod/riverpod.dart"; | |
void main() { | |
// A `ProviderContainer` is the central storage for the state of all providers. | |
final container = ProviderContainer(); | |
// A `StateProvider` is used to expose a simple, mutable piece of state. | |
// In this case, 'counter' holds an integer value, initialized to 0. | |
final counter = StateProvider((ref) => 0); |
import 'package:signals/signals.dart'; | |
void main() { | |
final counter = signal(0); | |
effect(() => print(counter.value)); | |
// Logs: 1 | |
counter.value = 1; | |
} |
import 'package:flutter/material.dart'; | |
import 'package:flutter_solidart/flutter_solidart.dart'; | |
class SignalInputController extends Signal<TextEditingValue> | |
implements TextEditingController { | |
late final TextEditingController _controller; | |
late final Effect _effect; | |
SignalInputController({String? text}) | |
: super(TextEditingValue(text: text ?? "")) { |
/// Shamelessly copied from flutter_signals | |
import 'package:flutter_hooks/flutter_hooks.dart'; | |
import 'package:solidart/solidart.dart'; | |
/// Bind an existing signal to the hook widget | |
T useExistingSignal<T extends ReadSignal>(T value) { | |
final target = useMemoized(() => value, []); | |
return use(_SignalHook('useExistingSignal', target)); | |
} |
import 'dart:async'; | |
import 'dart:ffi'; | |
import 'package:jni/jni.dart'; | |
import 'package:shiur_23_app/android_utils.dart'; | |
import 'package:shiur_23_app/player.interface.dart'; | |
import 'package:solidart/solidart.dart'; | |
import 'dart:core' as core show Future; | |
import 'dart:core' hide Future; |