// ignore_for_file: non_constant_identifier_names, library_private_types_in_public_api import 'package:flutter/material.dart'; class ScoreWidget extends StatefulWidget { const ScoreWidget({super.key}); @override _ScoreWidgetState createState() => _ScoreWidgetState(); } class _ScoreWidgetState extends State { @override void initState() { super.initState(); } @override void dispose() { super.dispose(); } @override Widget build(BuildContext context) { return Scaffold( body: SingleChildScrollView( child: Padding( padding: const EdgeInsets.all(16.0), child: Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: [ // Üst Bilgi Alanı SizedBox( height: 150, child: Card( color: Colors.grey[200], elevation: 4, child: Padding( padding: const EdgeInsets.all(16.0), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.center, children: const [ Text( 'Proje Kodu: 001', style: TextStyle(fontWeight: FontWeight.bold), ), SizedBox(height: 8), Text('Tamamlanma Yüzdesi: %25'), ], ), const Icon( Icons.settings_applications, size: 50, color: Colors.blueGrey, ), ], ), ), ), ), const SizedBox(height: 16), // Operatör Bilgileri SizedBox( // height: 200, child: Card( color: Colors.grey[100], elevation: 4, child: Padding( padding: const EdgeInsets.all(16.0), child: Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: [ const Text( 'Operatör Bilgileri', style: TextStyle( fontWeight: FontWeight.bold, fontSize: 18, ), ), const SizedBox(height: 16), HmiInputField( label: 'Operatör Adı', hintText: 'Operatör kartı okutuluyor...', isReadOnly: true, ), const SizedBox(height: 16), HmiInputField( label: 'Makine Numarası', hintText: 'CNC-001', isReadOnly: true, ), ], ), ), ), ), const SizedBox(height: 16), // İş Detayları SizedBox( // height: 250, child: Card( color: Colors.grey[100], elevation: 4, child: Padding( padding: const EdgeInsets.all(16.0), child: Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: [ const Text( 'İş Detayları', style: TextStyle( fontWeight: FontWeight.bold, fontSize: 18, ), ), const SizedBox(height: 16), HmiInputField( label: 'Parça Adı', hintText: 'Parça adı okutuluyor...', isReadOnly: true, ), const SizedBox(height: 16), HmiInputField( label: 'Parça Adedi', hintText: 'Adet giriniz', ), const SizedBox(height: 16), HmiInputField( label: 'İş Süresi (dk)', hintText: 'Süreyi giriniz', ), ], ), ), ), ), const SizedBox(height: 16), // Kaydet Butonu ElevatedButton.icon( style: ElevatedButton.styleFrom( backgroundColor: Colors.blueGrey[700], padding: const EdgeInsets.symmetric(vertical: 16.0), ), onPressed: () { // Kaydetme işlemi }, icon: const Icon(Icons.save), label: const Text( 'Kaydet', style: TextStyle(fontSize: 18), ), ), /** */ /** */ /** */ GFAccordion( title: '🗓️ ${kayit.value.ismi} Günü Ayarları', // onToggleCollapsed: (p0) { // print(p0); // if (!p0) gunObs.value.molalarScrollController?.dispose(); // }, contentChild: Column( children: [], ), contentPadding: EdgeInsets.zero, collapsedIcon: const Icon(Icons.arrow_drop_down), expandedIcon: const Icon(Icons.arrow_drop_up), titleBorderRadius: const BorderRadius.only( topLeft: Radius.circular(5), topRight: Radius.circular(5), ), // expandedTitlebackgroundColor: Theme.of(context).extension()?.backgroundColor,//Colors.grey.shade200, contentBorder: Border.all(color: Colors.grey.shade200), contentBorderRadius: const BorderRadius.only( bottomLeft: Radius.circular(5), bottomRight: Radius.circular(5), ), titlePadding: const EdgeInsets.symmetric( horizontal: 10, vertical: 5, ), showAccordion: false, contentBackgroundColor: Theme.of(context).extension()?.cardBackgroundColor, ) /** */ /** */ /** */ ], ), ), ), ); } } class HmiInputField extends StatelessWidget { final String label; final String hintText; final bool isReadOnly; const HmiInputField({ super.key, required this.label, required this.hintText, this.isReadOnly = false, }); @override Widget build(BuildContext context) { return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( label, style: const TextStyle( fontWeight: FontWeight.bold, fontSize: 16, ), ), const SizedBox(height: 8), TextField( readOnly: isReadOnly, decoration: InputDecoration( hintText: hintText, border: OutlineInputBorder( borderRadius: BorderRadius.circular(8.0), ), filled: true, fillColor: isReadOnly ? Colors.grey[300] : Colors.white, ), ), ], ); } }