短视频平台源码,选择颜色flutter_colorpicker

短视频平台源码,选择颜色flutter_colorpicker实现的相关代码

onPressed: () {
            // 4
            showDialog(
              context: context,
              builder: (context) {
                // 5
                return AlertDialog(
                  content: BlockPicker(
                      pickerColor: Colors.white,
                      // 6
                      onColorChanged: (color) {
                        setState(() => _currentColor = color);
                      }),
                  actions: [
                    // 7
                    TextButton(
                      child: const Text('Save'),
                      onPressed: () {
                        Navigator.of(context).pop();
                      },
                    ),
                  ],
                );
              },
            );
          },

  以上就是 短视频平台源码,选择颜色flutter_colorpicker实现的相关代码,更多内容欢迎关注之后的文章

 

posted @ 2021-11-05 14:13  云豹科技-苏凌霄  阅读(79)  评论(0编辑  收藏  举报