rad 1.0.1-rc.1 rad: ^1.0.1-rc.1 copied to clipboard
A zero-dependency frontend framework for creating web apps using Dart. Inspired from Flutter & React.
A simple click testing demo using Rad:
import 'package:rad/rad.dart';
void main() {
runApp(
app: const ClickToggle(),
appTargetId: 'output',
);
}
class ClickToggle extends StatefulWidget {
@override
_ClickToggleState createState() => _ClickToggleState();
}
class _ClickToggleState extends State<ClickToggle> {
bool isClicked = false;
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: _handleTap,
child: Text(isClicked ? "on! click to turn off." : "click to turn on."),
);
}
_handleTap() {
setState(() {
isClicked = !isClicked;
});
}
}
For installing Rad please refer to package homepage