短視訊平臺原始碼,選擇顏色flutter_colorpicker

zhibo系統開發發表於2021-11-05

短視訊平臺原始碼,選擇顏色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實現的相關程式碼,更多內容歡迎關注之後的文章


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/69978258/viewspace-2840799/,如需轉載,請註明出處,否則將追究法律責任。

相關文章