CopyPastor

Detecting plagiarism made easy.

Score: 0.857758235476964; Reported for: String similarity Open both answers

Possible Plagiarism

Reposted on 2024-09-09
by Dmitrii Usatov

Original Post

Original - Posted on 2024-09-09
by Dmitrii Usatov



            
Present in both answers; Present only in the new answer; Present only in the old answer;

import 'package:flutter/material.dart';
class TestForm extends StatefulWidget { const TestForm({super.key});
@override State<TestForm> createState() => _TestFormState(); }
class _TestFormState extends State<TestForm> { final formKey = GlobalKey<FormState>();
void validateForm() { final invalidFields = formKey.currentState?.validateGranularly(); if (invalidFields != null && invalidFields.isNotEmpty) { Scrollable.ensureVisible(invalidFields.first.context); } }
@override Widget build(BuildContext context) { return SingleChildScrollView( child: Form( key: formKey, child: Column( children: [ const TextField(), const TextField(), const TextField(), OutlinedButton( onPressed: validateForm, child: const Text('Validate'), ), ], ), ), ); } }
import 'package:flutter/material.dart'; class TestForm extends StatefulWidget { const TestForm({super.key}); @override State<TestForm> createState() => _TestFormState(); } class _TestFormState extends State<TestForm> { final formKey = GlobalKey<FormState>(); void validateForm() { final invalidFields = formKey.currentState?.validateGranularly(); if (invalidFields != null && invalidFields.isNotEmpty) { Scrollable.ensureVisible(invalidFields.first.context); } } @override Widget build(BuildContext context) { return SingleChildScrollView( child: Form( key: formKey, child: Column( children: [ const TextField(), const TextField(), const TextField(), OutlinedButton( onPressed: validateForm, child: const Text('Validate'), ), ], ), ), ); } }

        
Present in both answers; Present only in the new answer; Present only in the old answer;