import 'package:flutter/material.dart'; import 'dart:io'; import 'package:flutter/services.dart'; import 'package:qhd_prevention/pages/my_appbar.dart'; import '../../tools/tools.dart'; import 'mine_sign_page.dart'; class FirstSignPage extends StatefulWidget { const FirstSignPage({super.key}); @override State createState() => _SignatureUpdatePageState(); } class _SignatureUpdatePageState extends State { String imagePath=""; @override Widget build(BuildContext context) { return Scaffold( appBar: MyAppbar(title: "更新签字信息"), body: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Row( children: [ GestureDetector( onTap: () { pushPage(MineSignPage(), context); }, child: Text("用户",style: TextStyle(color: Colors.black,fontSize: 16)), ), // _buildConfirmButton(), ], ), const SizedBox(height: 8), Row( children: [ Text('签字照片:', style: TextStyle( fontSize: 16, fontWeight: FontWeight.bold, color: Colors.grey, ), ), if (imagePath.isNotEmpty) Image.file(File(imagePath)), ], ), // 确认按钮 // const Spacer(), // _buildConfirmButton(), ], ), ); } Widget _buildConfirmButton() { return SizedBox( width: double.infinity, child: ElevatedButton( onPressed: () { }, style: ElevatedButton.styleFrom( backgroundColor: const Color(0xFF4285F4), padding: const EdgeInsets.symmetric(vertical: 16), shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(8), ), ), child: imagePath.isNotEmpty ? const SizedBox( width: 24, height: 24, child: CircularProgressIndicator( strokeWidth: 2, color: Colors.white, ), ) : const Text( '确认', style: TextStyle(fontSize: 18, color: Colors.white), ), ), ); } }