0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【Flutter】Missing concrete implementation of 'abstract class StatefulWidget extends Widget.createState'.(non_abstract_class_inherits_abstract_member)

Last updated at Posted at 2025-10-16

操作

  • StatelessWidgetからStatefulWidgetに変更しようとした
edit_title_view.dart
import 'package:flutter/material.dart';

class EditTitleView extends StatefulWidget {
  const EditTitleView({super.key});

  @override
  Widget build(BuildContext context) {
    return const Text("hoge");
  }
}

発生したエラー

Missing concrete implementation of 'abstract class StatefulWidget extends Widget.createState'.
Try implementing the missing method, or make the class abstract.dart(non_abstract_class_inherits_abstract_member)

解決策

  • 具体的なUIの描画に関するロジックは_Stateの中で定義しないといけないことを忘れていた。
  • なのでこのStatefulWidgetの中では_StatecreateState()するのみに留めなければならない。
edit_title_view.dart
import 'package:flutter/material.dart';
import 'package:app/model/titles.dart';

class EditTitleView extends StatefulWidget {
  const EditTitleView({super.key});

  @override
  State<EditTitleView> createState() => _EditTitleViewState();
}

class _EditTitleViewState extends State<EditTitleView> {
  @override
  Widget build(BuildContext context) {
    return const Text("hoge");
  }
}
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?