import 'package:flutter/material.dart'; import 'package:food_health/l10n/l10n.dart'; ///分割线 class LoginDivider extends StatelessWidget { const LoginDivider({super.key}); @override Widget build(BuildContext context) { return Container( margin: EdgeInsets.only(top: 20, bottom: 20), child: Row( spacing: 8, children: [ Expanded( child: Container( height: 1, color: Theme.of(context).colorScheme.surfaceContainer, ), ), Text( L10n.of.login_other_login, style: Theme.of(context).textTheme.labelMedium, ), Expanded( child: Container( height: 1, color: Theme.of(context).colorScheme.surfaceContainer, ), ), ], ), ); } } class OtherButton extends StatelessWidget { final Function() onTap; final String icon; const OtherButton({ super.key, required this.onTap, required this.icon, }); @override Widget build(BuildContext context) { return GestureDetector( onTap: onTap, child: Container( width: 45, padding: EdgeInsets.all(10), decoration: BoxDecoration( shape: BoxShape.circle, border: Border.all( color: Theme.of(context).colorScheme.surfaceContainer, ), ), child: AspectRatio( aspectRatio: 1, child: Image.asset(icon), ), ), ); } }