This is flutter sqlite local notification project. User can add task.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
965 B

2 years ago
  1. import 'package:flutter/cupertino.dart';
  2. import 'package:flutter/material.dart';
  3. import 'package:flutter/src/foundation/key.dart';
  4. import 'package:flutter/src/widgets/framework.dart';
  5. import 'package:sqflite_pust_local_notification/utils/colors.dart';
  6. class MyButton extends StatelessWidget {
  7. final String label;
  8. final Function()? onTap;
  9. const MyButton({Key? key, required this.label, required this.onTap})
  10. : super(key: key);
  11. @override
  12. Widget build(BuildContext context) {
  13. return GestureDetector(
  14. onTap: onTap,
  15. child: Container(
  16. alignment: Alignment.center,
  17. width: 120,
  18. height: 50,
  19. decoration: BoxDecoration(
  20. borderRadius: BorderRadius.circular(20), color: primaryClr),
  21. child: Text(
  22. label,
  23. textAlign: TextAlign.center,
  24. style: TextStyle(
  25. color: Colors.white, fontSize: 15, fontWeight: FontWeight.bold),
  26. ),
  27. ),
  28. );
  29. }
  30. }