Flutter NOTE

·

1 min read

Provider

https://medium.com/@madampitige90/provider-state-management-in-flutter-3bc555a1eafb

https://www.dhiwise.com/post/achieving-optimal-performance-with-flutter-provider-state-management

https://nureddineraslan.medium.com/understanding-state-management-with-provider-in-flut-e74e0b9e49d9

https://medium.com/bancolombia-tech/flutter-provider-what-is-it-what-is-it-for-and-how-to-use-it-47d6941860d7

https://medium.com/skyshidigital/state-management-dengan-provider-ddcaeef2ce5d

Button

https://stackoverflow.com/questions/49991444/create-a-rounded-button-button-with-border-radius-in-flutter

localization

https://phrase.com/blog/posts/flutter-localization/

Modal Bottom Sheet

showModalBottomSheet(
  context: context,
  isScrollControlled: true,
  builder: (BuildContext context) {
    return Wrap(
      children: [
        Container(
          padding: EdgeInsets.only(
              bottom: MediaQuery.of(context).viewInsets.bottom),
          decoration: BoxDecoration(
            borderRadius: const BorderRadius.only(
              topLeft: Radius.circular(10),
              topRight: Radius.circular(10),
            ),
            color: Theme.of(context).colorScheme.background,
          ),
          child: Container(
            margin: const EdgeInsets.symmetric(
                horizontal: 15, vertical: 10),
            child: Column(
              mainAxisSize: MainAxisSize.min,
              children: <Widget>[
                Center(
                  child: Container(
                    height: 5,
                    width: 36,
                    decoration: BoxDecoration(
                      borderRadius: BorderRadius.circular(8),
                      color: Theme.of(context)
                          .colorScheme
                          .secondary
                          .withOpacity(0.4),
                    ),
                  ),
                ),
                Column(
                  children: [
                    Container(
                      decoration: BoxDecoration(
                        borderRadius: BorderRadius.circular(8.0),
                        border: Border.all(
                          width: 1,
                          color: Theme.of(context)
                              .colorScheme
                              .secondaryContainer,
                        ),
                      ),
                      padding: const EdgeInsets.all(15),
                      margin: const EdgeInsets.symmetric(
                        vertical: 10,
                      ),
                      child: Column(
                        children: [
                          Align(
                            alignment: Alignment.centerLeft,
                            child: Text(
                              "TITLE",
                              style: TextStyle(
                                color: Theme.of(context)
                                    .colorScheme
                                    .onSecondary,
                                fontWeight: FontWeight.w700,
                                fontSize: 14,
                                fontFamily: FontFamily.mukta,
                              ),
                            ),
                          ),
                          Container(
                            margin: const EdgeInsets.symmetric(
                                vertical: 5),
                            alignment: Alignment.centerLeft,
                            child: Text(
                              'DESC',
                              style: TextStyle(
                                color: Theme.of(context)
                                    .colorScheme
                                    .secondary,
                                fontWeight: FontWeight.w400,
                                fontSize: 12,
                                fontFamily: FontFamily.mukta,
                              ),
                            ),
                          ),
                          Container(
                            margin: const EdgeInsets.symmetric(
                                vertical: 5),
                            alignment: Alignment.centerLeft,
                            child: Text(
                              'PRICE',
                              style: TextStyle(
                                color: Theme.of(context)
                                    .colorScheme
                                    .primary,
                                fontWeight: FontWeight.w700,
                                fontSize: 14,
                                fontFamily: FontFamily.mukta,
                              ),
                            ),
                          ),
                        ],
                      ),
                    ),
                  ],
                ),
              ],
            ),
          ),
        ),
      ],
    );
  },
);