getCommitButton method
Implementation
Widget getCommitButton() {
if (_commitButton != null) return _commitButton!;
// 提供安全的默认值,避免 context 为 null 时崩溃
final primaryColor = context != null
? Theme.of(context!).primaryColor
: Colors.blue;
return Container(
alignment: Alignment.center,
padding: const EdgeInsets.only(left: 12, right: 22),
child: Text(
'确定',
style: TextStyle(
color: primaryColor,
fontSize: 16.0,
),
),
);
}