import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';

import 'widgets/DoctorView.dart';

class SearchResults extends StatefulWidget {
  List<DoctorList> doctorsList = [];

  SearchResults({@required this.doctorsList});

  @override
  _SearchResultsState createState() => _SearchResultsState();
}

class _SearchResultsState extends State<SearchResults> {
  @override
  void initState() {
    // TODO: implement initState
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return AppScaffold(
      appBarTitle: TranslationBase.of(context).bookAppo,
      isShowAppBar: true,
      body: Container(
        margin: EdgeInsets.only(bottom: 10.0),
        child: SingleChildScrollView(
          child: ListView.builder(
            scrollDirection: Axis.vertical,
            shrinkWrap: true,
            physics: ScrollPhysics(),
            padding: EdgeInsets.all(0.0),
            itemCount: widget.doctorsList.length,
            itemBuilder: (context, index) {
              return DoctorView(
                doctor: widget.doctorsList[index],
              );
            },
          ),
        ),
      ),
    );
  }
}
